zudoku 0.32.1 → 0.32.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/tailwind.js +6 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +15 -15
- package/dist/config/validators/InputSidebarSchema.js +10 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +40 -40
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +19 -19
- package/dist/lib/components/Header.js +2 -2
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +3 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +2 -0
- package/dist/lib/components/navigation/SidebarBadge.js +3 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -1
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +3 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -2
- package/dist/lib/plugins/api-catalog/Catalog.js +11 -24
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +1 -0
- package/dist/lib/plugins/api-catalog/index.js +37 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +2 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +0 -11
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +14 -0
- package/dist/lib/{components → ui}/SyntaxHighlight.js +9 -6
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.js +1 -1
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.js +4 -14
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/plugin-api.js +2 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +2 -1
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +5 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/lib/{AuthenticationPlugin-_YVa673u.js → AuthenticationPlugin-BlxA4Mbn.js} +4 -4
- package/lib/{AuthenticationPlugin-_YVa673u.js.map → AuthenticationPlugin-BlxA4Mbn.js.map} +1 -1
- package/lib/{CategoryHeading-MYL1u_6K.js → CategoryHeading-DpB47wvk.js} +3 -3
- package/lib/{CategoryHeading-MYL1u_6K.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/{Markdown-8mv9nhGd.js → Markdown-Cr9sYpR_.js} +4800 -4729
- package/lib/Markdown-Cr9sYpR_.js.map +1 -0
- package/lib/{MdxPage-GM1T5jmO.js → MdxPage-Dt-UEQl8.js} +10 -10
- package/lib/MdxPage-Dt-UEQl8.js.map +1 -0
- package/lib/{OasProvider-IS9wBrb7.js → OasProvider-WVtvHP5H.js} +6 -6
- package/lib/{OasProvider-IS9wBrb7.js.map → OasProvider-WVtvHP5H.js.map} +1 -1
- package/lib/{OperationList-BTmRbbXk.js → OperationList-DhOwupvv.js} +18 -19
- package/lib/{OperationList-BTmRbbXk.js.map → OperationList-DhOwupvv.js.map} +1 -1
- package/lib/Select-D9hI1G-y.js +223 -0
- package/lib/{Select-D9CKL33X.js.map → Select-D9hI1G-y.js.map} +1 -1
- package/lib/{SlotletProvider-D0mFmGJu.js → SlotletProvider-CEfNOA8i.js} +53 -53
- package/lib/{SlotletProvider-D0mFmGJu.js.map → SlotletProvider-CEfNOA8i.js.map} +1 -1
- package/lib/{Spinner-BlzrEEk1.js → Spinner-1KrEmx1V.js} +3 -3
- package/lib/{Spinner-BlzrEEk1.js.map → Spinner-1KrEmx1V.js.map} +1 -1
- package/lib/{SyntaxHighlight-B0L4SC_N.js → SyntaxHighlight-CcnUjERD.js} +445 -445
- package/lib/SyntaxHighlight-CcnUjERD.js.map +1 -0
- package/lib/{chunk-SYFQ2XB5-QijJrSf0.js → chunk-IR6S3I6Y-D_3UmFIn.js} +597 -597
- package/lib/chunk-IR6S3I6Y-D_3UmFIn.js.map +1 -0
- package/lib/{circular-DxaIIlWD.js → circular-v7K6lDDh.js} +1413 -1413
- package/lib/{circular-DxaIIlWD.js.map → circular-v7K6lDDh.js.map} +1 -1
- package/lib/context-DLCwaMXN.js +22 -0
- package/lib/{context-rwLGh-6_.js.map → context-DLCwaMXN.js.map} +1 -1
- package/lib/{createServer-DSQiPwjN.js → createServer-DMf6O2Rz.js} +3669 -3562
- package/lib/createServer-DMf6O2Rz.js.map +1 -0
- package/lib/{hook-C_t2ISLC.js → hook-CWwSAAlH.js} +384 -379
- package/lib/hook-CWwSAAlH.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/{index-Djenk2Hj.js.map → index-CPNSgwSb.js.map} +1 -1
- package/lib/{index-BANyVRgL.js → index-Do_30Hpk.js} +78 -78
- package/lib/index-Do_30Hpk.js.map +1 -0
- package/lib/{index-B7mqiOei.js → index-Du5aNddU.js} +101 -101
- package/lib/index-Du5aNddU.js.map +1 -0
- package/lib/{index-CjJS0l4l.js → index-LNp6rxyU.js} +2 -2
- package/lib/{index-CjJS0l4l.js.map → index-LNp6rxyU.js.map} +1 -1
- package/lib/{index.esm-CrSoEshU.js → index.esm--gIChbWs.js} +3 -3
- package/lib/{index.esm-CrSoEshU.js.map → index.esm--gIChbWs.js.map} +1 -1
- package/lib/{index.esm-9-TF9KQB.js → index.esm-CQHE3GEU.js} +52 -53
- package/lib/{index.esm-9-TF9KQB.js.map → index.esm-CQHE3GEU.js.map} +1 -1
- package/lib/joinUrl-10po2Jdj.js +20 -0
- package/lib/{joinUrl-nLx9pD-Z.js.map → joinUrl-10po2Jdj.js.map} +1 -1
- package/lib/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +99 -99
- package/lib/{jsx-runtime-Bdg6XQ1m.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
- package/lib/{mutation-Cm3O9f3X.js → mutation-B0wxqzSN.js} +26 -26
- package/lib/{mutation-Cm3O9f3X.js.map → mutation-B0wxqzSN.js.map} +1 -1
- package/lib/post-processors/removeExtensions.js +4 -4
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +4 -4
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +4 -4
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +521 -543
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +5 -5
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +10 -10
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +10 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/{useExposedProps-Bbf99zic.js → useExposedProps-RIvey2Oy.js} +2 -2
- package/lib/{useExposedProps-Bbf99zic.js.map → useExposedProps-RIvey2Oy.js.map} +1 -1
- package/lib/{useScrollToAnchor-BGEcH3HM.js → useScrollToAnchor-C-sRxs9o.js} +13 -9
- package/lib/useScrollToAnchor-C-sRxs9o.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +18 -18
- package/lib/zudoku.auth-openid.js +255 -295
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +290 -283
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +91 -108
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/package.json +49 -50
- package/src/app/tailwind.ts +6 -0
- package/src/lib/components/Header.tsx +3 -3
- package/src/lib/components/Layout.tsx +2 -2
- package/src/lib/components/TopNavigation.tsx +13 -9
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/SidebarBadge.tsx +4 -1
- package/src/lib/components/navigation/SidebarItem.tsx +1 -0
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +31 -94
- package/src/lib/plugins/api-catalog/index.tsx +54 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +9 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +1 -1
- package/src/lib/{components → ui}/SyntaxHighlight.tsx +23 -8
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +1 -1
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -12
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/lib/Markdown-8mv9nhGd.js.map +0 -1
- package/lib/MdxPage-GM1T5jmO.js.map +0 -1
- package/lib/Select-D9CKL33X.js +0 -223
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
- package/lib/context-rwLGh-6_.js +0 -22
- package/lib/createServer-DSQiPwjN.js.map +0 -1
- package/lib/hook-C_t2ISLC.js.map +0 -1
- package/lib/index-B7mqiOei.js.map +0 -1
- package/lib/index-BANyVRgL.js.map +0 -1
- package/lib/index-Djenk2Hj.js +0 -36
- package/lib/joinUrl-nLx9pD-Z.js +0 -20
- package/lib/useScrollToAnchor-BGEcH3HM.js.map +0 -1
|
@@ -1,50 +1,124 @@
|
|
|
1
|
-
import { j as I } from "./jsx-runtime-
|
|
1
|
+
import { j as I } from "./jsx-runtime-CYK1ROHF.js";
|
|
2
2
|
import * as _ from "react";
|
|
3
|
-
import { createElement as he, useCallback as
|
|
4
|
-
import { a as ce, c as
|
|
3
|
+
import { createElement as he, useCallback as X, useMemo as ve, useState as ke } from "react";
|
|
4
|
+
import { a as ce, c as V } from "./cn-qaFjX9_3.js";
|
|
5
5
|
import { CheckIcon as we, CopyIcon as Ee } from "lucide-react";
|
|
6
6
|
import { C as xe } from "./ClientOnly-E7hGysn1.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
var Se = (e, t, a, i, d, m, c, h) => {
|
|
8
|
+
let u = document.documentElement, g = ["light", "dark"];
|
|
9
|
+
function b(w) {
|
|
10
|
+
(Array.isArray(e) ? e : [e]).forEach((n) => {
|
|
11
|
+
let r = n === "class", s = r && m ? d.map((p) => m[p] || p) : d;
|
|
12
|
+
r ? (u.classList.remove(...s), u.classList.add(w)) : u.setAttribute(n, w);
|
|
13
|
+
}), f(w);
|
|
14
|
+
}
|
|
15
|
+
function f(w) {
|
|
16
|
+
h && g.includes(w) && (u.style.colorScheme = w);
|
|
17
|
+
}
|
|
18
|
+
function v() {
|
|
19
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
20
|
+
}
|
|
21
|
+
if (i) b(i);
|
|
22
|
+
else try {
|
|
23
|
+
let w = localStorage.getItem(t) || a, n = c && w === "system" ? v() : w;
|
|
24
|
+
b(n);
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
}, ne = ["light", "dark"], pe = "(prefers-color-scheme: dark)", Ae = typeof window > "u", J = _.createContext(void 0), _e = { setTheme: (e) => {
|
|
28
|
+
}, themes: [] }, Fe = () => {
|
|
29
|
+
var e;
|
|
30
|
+
return (e = _.useContext(J)) != null ? e : _e;
|
|
31
|
+
}, Ut = (e) => _.useContext(J) ? _.createElement(_.Fragment, null, e.children) : _.createElement(Re, { ...e }), Te = ["light", "dark"], Re = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: a = !0, enableColorScheme: i = !0, storageKey: d = "theme", themes: m = Te, defaultTheme: c = a ? "system" : "light", attribute: h = "data-theme", value: u, children: g, nonce: b, scriptProps: f }) => {
|
|
32
|
+
let [v, w] = _.useState(() => re(d, c)), [n, r] = _.useState(() => re(d)), s = u ? Object.values(u) : m, p = _.useCallback((k) => {
|
|
33
|
+
let x = k;
|
|
34
|
+
if (!x) return;
|
|
35
|
+
k === "system" && a && (x = oe());
|
|
36
|
+
let S = u ? u[x] : x, F = t ? Le(b) : null, A = document.documentElement, N = (T) => {
|
|
37
|
+
T === "class" ? (A.classList.remove(...s), S && A.classList.add(S)) : T.startsWith("data-") && (S ? A.setAttribute(T, S) : A.removeAttribute(T));
|
|
38
|
+
};
|
|
39
|
+
if (Array.isArray(h) ? h.forEach(N) : N(h), i) {
|
|
40
|
+
let T = ne.includes(c) ? c : null, O = ne.includes(x) ? x : T;
|
|
41
|
+
A.style.colorScheme = O;
|
|
42
|
+
}
|
|
43
|
+
F == null || F();
|
|
44
|
+
}, [b]), l = _.useCallback((k) => {
|
|
45
|
+
let x = typeof k == "function" ? k(v) : k;
|
|
46
|
+
w(x);
|
|
47
|
+
try {
|
|
48
|
+
localStorage.setItem(d, x);
|
|
49
|
+
} catch {
|
|
50
|
+
}
|
|
51
|
+
}, [v]), y = _.useCallback((k) => {
|
|
52
|
+
let x = oe(k);
|
|
53
|
+
r(x), v === "system" && a && !e && p("system");
|
|
54
|
+
}, [v, e]);
|
|
55
|
+
_.useEffect(() => {
|
|
56
|
+
let k = window.matchMedia(pe);
|
|
57
|
+
return k.addListener(y), y(k), () => k.removeListener(y);
|
|
58
|
+
}, [y]), _.useEffect(() => {
|
|
59
|
+
let k = (x) => {
|
|
60
|
+
x.key === d && (x.newValue ? w(x.newValue) : l(c));
|
|
61
|
+
};
|
|
62
|
+
return window.addEventListener("storage", k), () => window.removeEventListener("storage", k);
|
|
63
|
+
}, [l]), _.useEffect(() => {
|
|
64
|
+
p(e ?? v);
|
|
65
|
+
}, [e, v]);
|
|
66
|
+
let E = _.useMemo(() => ({ theme: v, setTheme: l, forcedTheme: e, resolvedTheme: v === "system" ? n : v, themes: a ? [...m, "system"] : m, systemTheme: a ? n : void 0 }), [v, l, e, n, a, m]);
|
|
67
|
+
return _.createElement(J.Provider, { value: E }, _.createElement(Ie, { forcedTheme: e, storageKey: d, attribute: h, enableSystem: a, enableColorScheme: i, defaultTheme: c, value: u, themes: m, nonce: b, scriptProps: f }), g);
|
|
68
|
+
}, Ie = _.memo(({ forcedTheme: e, storageKey: t, attribute: a, enableSystem: i, enableColorScheme: d, defaultTheme: m, value: c, themes: h, nonce: u, scriptProps: g }) => {
|
|
69
|
+
let b = JSON.stringify([a, t, m, e, h, c, i, d]).slice(1, -1);
|
|
70
|
+
return _.createElement("script", { ...g, suppressHydrationWarning: !0, nonce: typeof window > "u" ? u : "", dangerouslySetInnerHTML: { __html: `(${Se.toString()})(${b})` } });
|
|
71
|
+
}), re = (e, t) => {
|
|
72
|
+
if (Ae) return;
|
|
73
|
+
let a;
|
|
74
|
+
try {
|
|
75
|
+
a = localStorage.getItem(e) || void 0;
|
|
76
|
+
} catch {
|
|
77
|
+
}
|
|
78
|
+
return a || t;
|
|
79
|
+
}, Le = (e) => {
|
|
80
|
+
let t = document.createElement("style");
|
|
81
|
+
return e && t.setAttribute("nonce", e), t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")), document.head.appendChild(t), () => {
|
|
82
|
+
window.getComputedStyle(document.body), setTimeout(() => {
|
|
83
|
+
document.head.removeChild(t);
|
|
84
|
+
}, 1);
|
|
85
|
+
};
|
|
86
|
+
}, oe = (e) => (e || (e = window.matchMedia(pe)), e.matches ? "dark" : "light"), Oe = Object.create, W = Object.defineProperty, Ne = Object.defineProperties, Ce = Object.getOwnPropertyDescriptor, De = Object.getOwnPropertyDescriptors, de = Object.getOwnPropertyNames, Z = Object.getOwnPropertySymbols, Be = Object.getPrototypeOf, ee = Object.prototype.hasOwnProperty, ge = Object.prototype.propertyIsEnumerable, se = (e, t, a) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, B = (e, t) => {
|
|
13
87
|
for (var a in t || (t = {}))
|
|
14
|
-
|
|
88
|
+
ee.call(t, a) && se(e, a, t[a]);
|
|
15
89
|
if (Z)
|
|
16
90
|
for (var a of Z(t))
|
|
17
|
-
|
|
91
|
+
ge.call(t, a) && se(e, a, t[a]);
|
|
18
92
|
return e;
|
|
19
|
-
}, q = (e, t) =>
|
|
93
|
+
}, q = (e, t) => Ne(e, De(t)), ye = (e, t) => {
|
|
20
94
|
var a = {};
|
|
21
|
-
for (var
|
|
22
|
-
|
|
95
|
+
for (var i in e)
|
|
96
|
+
ee.call(e, i) && t.indexOf(i) < 0 && (a[i] = e[i]);
|
|
23
97
|
if (e != null && Z)
|
|
24
|
-
for (var
|
|
25
|
-
t.indexOf(
|
|
98
|
+
for (var i of Z(e))
|
|
99
|
+
t.indexOf(i) < 0 && ge.call(e, i) && (a[i] = e[i]);
|
|
26
100
|
return a;
|
|
27
|
-
},
|
|
28
|
-
return t || (0, e[
|
|
29
|
-
},
|
|
101
|
+
}, $e = (e, t) => function() {
|
|
102
|
+
return t || (0, e[de(e)[0]])((t = { exports: {} }).exports, t), t.exports;
|
|
103
|
+
}, Pe = (e, t) => {
|
|
30
104
|
for (var a in t)
|
|
31
105
|
W(e, a, { get: t[a], enumerable: !0 });
|
|
32
|
-
},
|
|
106
|
+
}, je = (e, t, a, i) => {
|
|
33
107
|
if (t && typeof t == "object" || typeof t == "function")
|
|
34
|
-
for (let d of
|
|
35
|
-
!
|
|
108
|
+
for (let d of de(t))
|
|
109
|
+
!ee.call(e, d) && d !== a && W(e, d, { get: () => t[d], enumerable: !(i = Ce(t, d)) || i.enumerable });
|
|
36
110
|
return e;
|
|
37
|
-
},
|
|
111
|
+
}, ze = (e, t, a) => (a = e != null ? Oe(Be(e)) : {}, je(
|
|
38
112
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
113
|
// file that has been converted to a CommonJS file using a Babel-
|
|
40
114
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
115
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
116
|
!e || !e.__esModule ? W(a, "default", { value: e, enumerable: !0 }) : a,
|
|
43
117
|
e
|
|
44
|
-
)),
|
|
118
|
+
)), Me = $e({
|
|
45
119
|
"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e, t) {
|
|
46
120
|
var a = function() {
|
|
47
|
-
var
|
|
121
|
+
var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, d = 0, m = {}, c = {
|
|
48
122
|
/**
|
|
49
123
|
* A namespace for utility methods.
|
|
50
124
|
*
|
|
@@ -56,7 +130,7 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
56
130
|
*/
|
|
57
131
|
util: {
|
|
58
132
|
encode: function n(r) {
|
|
59
|
-
return r instanceof
|
|
133
|
+
return r instanceof h ? new h(r.type, n(r.content), r.alias) : Array.isArray(r) ? r.map(n) : r.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
60
134
|
},
|
|
61
135
|
/**
|
|
62
136
|
* Returns the name of the type of the given value.
|
|
@@ -98,21 +172,21 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
98
172
|
*/
|
|
99
173
|
clone: function n(r, s) {
|
|
100
174
|
s = s || {};
|
|
101
|
-
var p,
|
|
102
|
-
switch (
|
|
175
|
+
var p, l;
|
|
176
|
+
switch (c.util.type(r)) {
|
|
103
177
|
case "Object":
|
|
104
|
-
if (
|
|
105
|
-
return s[
|
|
178
|
+
if (l = c.util.objId(r), s[l])
|
|
179
|
+
return s[l];
|
|
106
180
|
p = /** @type {Record<string, any>} */
|
|
107
|
-
{}, s[
|
|
108
|
-
for (var
|
|
109
|
-
r.hasOwnProperty(
|
|
181
|
+
{}, s[l] = p;
|
|
182
|
+
for (var y in r)
|
|
183
|
+
r.hasOwnProperty(y) && (p[y] = n(r[y], s));
|
|
110
184
|
return (
|
|
111
185
|
/** @type {any} */
|
|
112
186
|
p
|
|
113
187
|
);
|
|
114
188
|
case "Array":
|
|
115
|
-
return
|
|
189
|
+
return l = c.util.objId(r), s[l] ? s[l] : (p = [], s[l] = p, r.forEach(function(E, k) {
|
|
116
190
|
p[k] = n(E, s);
|
|
117
191
|
}), /** @type {any} */
|
|
118
192
|
p);
|
|
@@ -130,7 +204,7 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
130
204
|
*/
|
|
131
205
|
getLanguage: function(n) {
|
|
132
206
|
for (; n; ) {
|
|
133
|
-
var r =
|
|
207
|
+
var r = i.exec(n.className);
|
|
134
208
|
if (r)
|
|
135
209
|
return r[1].toLowerCase();
|
|
136
210
|
n = n.parentElement;
|
|
@@ -145,7 +219,7 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
145
219
|
* @returns {void}
|
|
146
220
|
*/
|
|
147
221
|
setLanguage: function(n, r) {
|
|
148
|
-
n.className = n.className.replace(RegExp(
|
|
222
|
+
n.className = n.className.replace(RegExp(i, "gi"), ""), n.classList.add("language-" + r);
|
|
149
223
|
},
|
|
150
224
|
/**
|
|
151
225
|
* Returns whether a given class is active for `element`.
|
|
@@ -168,10 +242,10 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
168
242
|
*/
|
|
169
243
|
isActive: function(n, r, s) {
|
|
170
244
|
for (var p = "no-" + r; n; ) {
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
245
|
+
var l = n.classList;
|
|
246
|
+
if (l.contains(r))
|
|
173
247
|
return !0;
|
|
174
|
-
if (
|
|
248
|
+
if (l.contains(p))
|
|
175
249
|
return !1;
|
|
176
250
|
n = n.parentElement;
|
|
177
251
|
}
|
|
@@ -189,10 +263,10 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
189
263
|
/**
|
|
190
264
|
* The grammar for plain, unformatted text.
|
|
191
265
|
*/
|
|
192
|
-
plain:
|
|
193
|
-
plaintext:
|
|
194
|
-
text:
|
|
195
|
-
txt:
|
|
266
|
+
plain: m,
|
|
267
|
+
plaintext: m,
|
|
268
|
+
text: m,
|
|
269
|
+
txt: m,
|
|
196
270
|
/**
|
|
197
271
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
198
272
|
*
|
|
@@ -222,7 +296,7 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
222
296
|
* });
|
|
223
297
|
*/
|
|
224
298
|
extend: function(n, r) {
|
|
225
|
-
var s =
|
|
299
|
+
var s = c.util.clone(c.languages[n]);
|
|
226
300
|
for (var p in r)
|
|
227
301
|
s[p] = r[p];
|
|
228
302
|
return s;
|
|
@@ -304,29 +378,29 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
304
378
|
*/
|
|
305
379
|
insertBefore: function(n, r, s, p) {
|
|
306
380
|
p = p || /** @type {any} */
|
|
307
|
-
|
|
308
|
-
var
|
|
309
|
-
for (var E in
|
|
310
|
-
if (
|
|
381
|
+
c.languages;
|
|
382
|
+
var l = p[n], y = {};
|
|
383
|
+
for (var E in l)
|
|
384
|
+
if (l.hasOwnProperty(E)) {
|
|
311
385
|
if (E == r)
|
|
312
386
|
for (var k in s)
|
|
313
|
-
s.hasOwnProperty(k) && (
|
|
314
|
-
s.hasOwnProperty(E) || (
|
|
387
|
+
s.hasOwnProperty(k) && (y[k] = s[k]);
|
|
388
|
+
s.hasOwnProperty(E) || (y[E] = l[E]);
|
|
315
389
|
}
|
|
316
390
|
var x = p[n];
|
|
317
|
-
return p[n] =
|
|
318
|
-
F === x && S != n && (this[S] =
|
|
319
|
-
}),
|
|
391
|
+
return p[n] = y, c.languages.DFS(c.languages, function(S, F) {
|
|
392
|
+
F === x && S != n && (this[S] = y);
|
|
393
|
+
}), y;
|
|
320
394
|
},
|
|
321
395
|
// Traverse a language definition with Depth First Search
|
|
322
|
-
DFS: function n(r, s, p,
|
|
323
|
-
|
|
324
|
-
var
|
|
396
|
+
DFS: function n(r, s, p, l) {
|
|
397
|
+
l = l || {};
|
|
398
|
+
var y = c.util.objId;
|
|
325
399
|
for (var E in r)
|
|
326
400
|
if (r.hasOwnProperty(E)) {
|
|
327
401
|
s.call(r, E, r[E], p || E);
|
|
328
|
-
var k = r[E], x =
|
|
329
|
-
x === "Object" && !
|
|
402
|
+
var k = r[E], x = c.util.type(k);
|
|
403
|
+
x === "Object" && !l[y(k)] ? (l[y(k)] = !0, n(k, s, null, l)) : x === "Array" && !l[y(k)] && (l[y(k)] = !0, n(k, s, E, l));
|
|
330
404
|
}
|
|
331
405
|
}
|
|
332
406
|
},
|
|
@@ -357,9 +431,9 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
357
431
|
grammar: r,
|
|
358
432
|
language: s
|
|
359
433
|
};
|
|
360
|
-
if (
|
|
434
|
+
if (c.hooks.run("before-tokenize", p), !p.grammar)
|
|
361
435
|
throw new Error('The language "' + p.language + '" has no grammar.');
|
|
362
|
-
return p.tokens =
|
|
436
|
+
return p.tokens = c.tokenize(p.code, p.grammar), c.hooks.run("after-tokenize", p), h.stringify(c.util.encode(p.tokens), p.language);
|
|
363
437
|
},
|
|
364
438
|
/**
|
|
365
439
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -392,8 +466,8 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
392
466
|
r[p] = s[p];
|
|
393
467
|
delete r.rest;
|
|
394
468
|
}
|
|
395
|
-
var
|
|
396
|
-
return
|
|
469
|
+
var l = new b();
|
|
470
|
+
return f(l, l.head, n), g(n, l, r, l.head, 0), w(l);
|
|
397
471
|
},
|
|
398
472
|
/**
|
|
399
473
|
* @namespace
|
|
@@ -415,7 +489,7 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
415
489
|
* @public
|
|
416
490
|
*/
|
|
417
491
|
add: function(n, r) {
|
|
418
|
-
var s =
|
|
492
|
+
var s = c.hooks.all;
|
|
419
493
|
s[n] = s[n] || [], s[n].push(r);
|
|
420
494
|
},
|
|
421
495
|
/**
|
|
@@ -428,18 +502,18 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
428
502
|
* @public
|
|
429
503
|
*/
|
|
430
504
|
run: function(n, r) {
|
|
431
|
-
var s =
|
|
505
|
+
var s = c.hooks.all[n];
|
|
432
506
|
if (!(!s || !s.length))
|
|
433
|
-
for (var p = 0,
|
|
434
|
-
|
|
507
|
+
for (var p = 0, l; l = s[p++]; )
|
|
508
|
+
l(r);
|
|
435
509
|
}
|
|
436
510
|
},
|
|
437
|
-
Token:
|
|
511
|
+
Token: h
|
|
438
512
|
};
|
|
439
|
-
function
|
|
513
|
+
function h(n, r, s, p) {
|
|
440
514
|
this.type = n, this.content = r, this.alias = s, this.length = (p || "").length | 0;
|
|
441
515
|
}
|
|
442
|
-
|
|
516
|
+
h.stringify = function n(r, s) {
|
|
443
517
|
if (typeof r == "string")
|
|
444
518
|
return r;
|
|
445
519
|
if (Array.isArray(r)) {
|
|
@@ -448,72 +522,72 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
448
522
|
p += n(x, s);
|
|
449
523
|
}), p;
|
|
450
524
|
}
|
|
451
|
-
var
|
|
525
|
+
var l = {
|
|
452
526
|
type: r.type,
|
|
453
527
|
content: n(r.content, s),
|
|
454
528
|
tag: "span",
|
|
455
529
|
classes: ["token", r.type],
|
|
456
530
|
attributes: {},
|
|
457
531
|
language: s
|
|
458
|
-
},
|
|
459
|
-
|
|
532
|
+
}, y = r.alias;
|
|
533
|
+
y && (Array.isArray(y) ? Array.prototype.push.apply(l.classes, y) : l.classes.push(y)), c.hooks.run("wrap", l);
|
|
460
534
|
var E = "";
|
|
461
|
-
for (var k in
|
|
462
|
-
E += " " + k + '="' + (
|
|
463
|
-
return "<" +
|
|
535
|
+
for (var k in l.attributes)
|
|
536
|
+
E += " " + k + '="' + (l.attributes[k] || "").replace(/"/g, """) + '"';
|
|
537
|
+
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + E + ">" + l.content + "</" + l.tag + ">";
|
|
464
538
|
};
|
|
465
|
-
function
|
|
539
|
+
function u(n, r, s, p) {
|
|
466
540
|
n.lastIndex = r;
|
|
467
|
-
var
|
|
468
|
-
if (
|
|
469
|
-
var
|
|
470
|
-
|
|
541
|
+
var l = n.exec(s);
|
|
542
|
+
if (l && p && l[1]) {
|
|
543
|
+
var y = l[1].length;
|
|
544
|
+
l.index += y, l[0] = l[0].slice(y);
|
|
471
545
|
}
|
|
472
|
-
return
|
|
546
|
+
return l;
|
|
473
547
|
}
|
|
474
|
-
function g(n, r, s, p,
|
|
548
|
+
function g(n, r, s, p, l, y) {
|
|
475
549
|
for (var E in s)
|
|
476
550
|
if (!(!s.hasOwnProperty(E) || !s[E])) {
|
|
477
551
|
var k = s[E];
|
|
478
552
|
k = Array.isArray(k) ? k : [k];
|
|
479
553
|
for (var x = 0; x < k.length; ++x) {
|
|
480
|
-
if (
|
|
554
|
+
if (y && y.cause == E + "," + x)
|
|
481
555
|
return;
|
|
482
|
-
var S = k[x], F = S.inside, A = !!S.lookbehind,
|
|
483
|
-
if (
|
|
556
|
+
var S = k[x], F = S.inside, A = !!S.lookbehind, N = !!S.greedy, T = S.alias;
|
|
557
|
+
if (N && !S.pattern.global) {
|
|
484
558
|
var O = S.pattern.toString().match(/[imsuy]*$/)[0];
|
|
485
559
|
S.pattern = RegExp(S.pattern.source, O + "g");
|
|
486
560
|
}
|
|
487
|
-
for (var
|
|
561
|
+
for (var te = S.pattern || S, R = p.next, D = l; R !== r.tail && !(y && D >= y.reach); D += R.value.length, R = R.next) {
|
|
488
562
|
var P = R.value;
|
|
489
563
|
if (r.length > n.length)
|
|
490
564
|
return;
|
|
491
|
-
if (!(P instanceof
|
|
492
|
-
var z = 1,
|
|
493
|
-
if (
|
|
494
|
-
if (
|
|
565
|
+
if (!(P instanceof h)) {
|
|
566
|
+
var z = 1, C;
|
|
567
|
+
if (N) {
|
|
568
|
+
if (C = u(te, D, n, A), !C || C.index >= n.length)
|
|
495
569
|
break;
|
|
496
|
-
var M =
|
|
570
|
+
var M = C.index, be = C.index + C[0].length, $ = D;
|
|
497
571
|
for ($ += R.value.length; M >= $; )
|
|
498
572
|
R = R.next, $ += R.value.length;
|
|
499
|
-
if ($ -= R.value.length, D = $, R.value instanceof
|
|
573
|
+
if ($ -= R.value.length, D = $, R.value instanceof h)
|
|
500
574
|
continue;
|
|
501
575
|
for (var j = R; j !== r.tail && ($ < be || typeof j.value == "string"); j = j.next)
|
|
502
576
|
z++, $ += j.value.length;
|
|
503
|
-
z--, P = n.slice(D, $),
|
|
504
|
-
} else if (
|
|
577
|
+
z--, P = n.slice(D, $), C.index -= D;
|
|
578
|
+
} else if (C = u(te, 0, P, A), !C)
|
|
505
579
|
continue;
|
|
506
|
-
var M =
|
|
507
|
-
|
|
580
|
+
var M = C.index, U = C[0], H = P.slice(0, M), ae = P.slice(M + U.length), Y = D + P.length;
|
|
581
|
+
y && Y > y.reach && (y.reach = Y);
|
|
508
582
|
var G = R.prev;
|
|
509
|
-
H && (G =
|
|
510
|
-
var me = new
|
|
511
|
-
if (R =
|
|
583
|
+
H && (G = f(r, G, H), D += H.length), v(r, G, z);
|
|
584
|
+
var me = new h(E, F ? c.tokenize(U, F) : U, T, U);
|
|
585
|
+
if (R = f(r, G, me), ae && f(r, R, ae), z > 1) {
|
|
512
586
|
var K = {
|
|
513
587
|
cause: E + "," + x,
|
|
514
588
|
reach: Y
|
|
515
589
|
};
|
|
516
|
-
g(n, r, s, R.prev, D, K),
|
|
590
|
+
g(n, r, s, R.prev, D, K), y && K.reach > y.reach && (y.reach = K.reach);
|
|
517
591
|
}
|
|
518
592
|
}
|
|
519
593
|
}
|
|
@@ -524,54 +598,54 @@ var Se = Object.create, W = Object.defineProperty, Ae = Object.defineProperties,
|
|
|
524
598
|
var n = { value: null, prev: null, next: null }, r = { value: null, prev: n, next: null };
|
|
525
599
|
n.next = r, this.head = n, this.tail = r, this.length = 0;
|
|
526
600
|
}
|
|
527
|
-
function
|
|
528
|
-
var p = r.next,
|
|
529
|
-
return r.next =
|
|
601
|
+
function f(n, r, s) {
|
|
602
|
+
var p = r.next, l = { value: s, prev: r, next: p };
|
|
603
|
+
return r.next = l, p.prev = l, n.length++, l;
|
|
530
604
|
}
|
|
531
605
|
function v(n, r, s) {
|
|
532
|
-
for (var p = r.next,
|
|
606
|
+
for (var p = r.next, l = 0; l < s && p !== n.tail; l++)
|
|
533
607
|
p = p.next;
|
|
534
|
-
r.next = p, p.prev = r, n.length -=
|
|
608
|
+
r.next = p, p.prev = r, n.length -= l;
|
|
535
609
|
}
|
|
536
610
|
function w(n) {
|
|
537
611
|
for (var r = [], s = n.head.next; s !== n.tail; )
|
|
538
612
|
r.push(s.value), s = s.next;
|
|
539
613
|
return r;
|
|
540
614
|
}
|
|
541
|
-
return
|
|
615
|
+
return c;
|
|
542
616
|
}();
|
|
543
617
|
t.exports = a, a.default = a;
|
|
544
618
|
}
|
|
545
|
-
}), o =
|
|
619
|
+
}), o = ze(Me());
|
|
546
620
|
o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, o.languages.markup.tag.inside["attr-value"].inside.entity = o.languages.markup.entity, o.languages.markup.doctype.inside["internal-subset"].inside = o.languages.markup, o.hooks.add("wrap", function(e) {
|
|
547
621
|
e.type === "entity" && (e.attributes.title = e.content.replace(/&/, "&"));
|
|
548
|
-
}), Object.defineProperty(o.languages.markup.tag, "addInlined", { value: function(e,
|
|
549
|
-
var a = {}, a = (a["language-" +
|
|
550
|
-
|
|
622
|
+
}), Object.defineProperty(o.languages.markup.tag, "addInlined", { value: function(e, i) {
|
|
623
|
+
var a = {}, a = (a["language-" + i] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: o.languages[i] }, a.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: a } }), i = (a["language-" + i] = { pattern: /[\s\S]+/, inside: o.languages[i] }, {});
|
|
624
|
+
i[e] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
551
625
|
return e;
|
|
552
|
-
}), "i"), lookbehind: !0, greedy: !0, inside: a }, o.languages.insertBefore("markup", "cdata",
|
|
626
|
+
}), "i"), lookbehind: !0, greedy: !0, inside: a }, o.languages.insertBefore("markup", "cdata", i);
|
|
553
627
|
} }), Object.defineProperty(o.languages.markup.tag, "addAttribute", { value: function(e, t) {
|
|
554
628
|
o.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [t, "language-" + t], inside: o.languages[t] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
|
|
555
629
|
} }), o.languages.html = o.languages.markup, o.languages.mathml = o.languages.markup, o.languages.svg = o.languages.markup, o.languages.xml = o.languages.extend("markup", {}), o.languages.ssml = o.languages.xml, o.languages.atom = o.languages.xml, o.languages.rss = o.languages.xml, function(e) {
|
|
556
|
-
var t = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, a = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,
|
|
557
|
-
e.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: !0, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: !0, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern:
|
|
630
|
+
var t = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: "escape" }, a = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, i = "(?:[^\\\\-]|" + a.source + ")", i = RegExp(i + "-" + i), d = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: !0, alias: "variable" };
|
|
631
|
+
e.languages.regex = { "char-class": { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: !0, inside: { "char-class-negation": { pattern: /(^\[)\^/, lookbehind: !0, alias: "operator" }, "char-class-punctuation": { pattern: /^\[|\]$/, alias: "punctuation" }, range: { pattern: i, inside: { escape: a, "range-punctuation": { pattern: /-/, alias: "operator" } } }, "special-escape": t, "char-set": { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, escape: a } }, "special-escape": t, "char-set": { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: "class-name" }, backreference: [{ pattern: /\\(?![123][0-7]{2})[1-9]/, alias: "keyword" }, { pattern: /\\k<[^<>']+>/, alias: "keyword", inside: { "group-name": d } }], anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: "function" }, escape: a, group: [{ pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/, alias: "punctuation", inside: { "group-name": d } }, { pattern: /\)/, alias: "punctuation" }], quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: "number" }, alternation: { pattern: /\|/, alias: "keyword" } };
|
|
558
632
|
}(o), o.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, o.languages.javascript = o.languages.extend("clike", { "class-name": [o.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), o.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, o.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: o.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: o.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: o.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: o.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: o.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), o.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: o.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), o.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), o.languages.markup && (o.languages.markup.tag.addInlined("script", "javascript"), o.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), o.languages.js = o.languages.javascript, o.languages.actionscript = o.languages.extend("javascript", { keyword: /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/, operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/ }), o.languages.actionscript["class-name"].alias = "function", delete o.languages.actionscript.parameter, delete o.languages.actionscript["literal-property"], o.languages.markup && o.languages.insertBefore("actionscript", "string", { xml: { pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/, lookbehind: !0, inside: o.languages.markup } }), function(e) {
|
|
559
633
|
var t = /#(?!\{).+/, a = { pattern: /#\{[^}]+\}/, alias: "variable" };
|
|
560
634
|
e.languages.coffeescript = e.languages.extend("javascript", { comment: t, string: [{ pattern: /'(?:\\[\s\S]|[^\\'])*'/, greedy: !0 }, { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: !0, inside: { interpolation: a } }], keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, "class-member": { pattern: /@(?!\d)\w+/, alias: "variable" } }), e.languages.insertBefore("coffeescript", "comment", { "multiline-comment": { pattern: /###[\s\S]+?###/, alias: "comment" }, "block-regex": { pattern: /\/{3}[\s\S]*?\/{3}/, alias: "regex", inside: { comment: t, interpolation: a } } }), e.languages.insertBefore("coffeescript", "string", { "inline-javascript": { pattern: /`(?:\\[\s\S]|[^\\`])*`/, inside: { delimiter: { pattern: /^`|`$/, alias: "punctuation" }, script: { pattern: /[\s\S]+/, alias: "language-javascript", inside: e.languages.javascript } } }, "multiline-string": [{ pattern: /'''[\s\S]*?'''/, greedy: !0, alias: "string" }, { pattern: /"""[\s\S]*?"""/, greedy: !0, alias: "string", inside: { interpolation: a } }] }), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
|
|
561
635
|
}(o), function(e) {
|
|
562
636
|
var t = e.languages.javadoclike = { parameter: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m, lookbehind: !0 }, keyword: { pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m, lookbehind: !0 }, punctuation: /[{}]/ };
|
|
563
|
-
Object.defineProperty(t, "addSupport", { value: function(a,
|
|
637
|
+
Object.defineProperty(t, "addSupport", { value: function(a, i) {
|
|
564
638
|
(a = typeof a == "string" ? [a] : a).forEach(function(d) {
|
|
565
|
-
var
|
|
566
|
-
|
|
567
|
-
},
|
|
568
|
-
if (
|
|
569
|
-
var
|
|
570
|
-
if ((
|
|
571
|
-
for (var g = 0, b =
|
|
572
|
-
|
|
639
|
+
var m = function(f) {
|
|
640
|
+
f.inside || (f.inside = {}), f.inside.rest = i;
|
|
641
|
+
}, c = "doc-comment";
|
|
642
|
+
if (h = e.languages[d]) {
|
|
643
|
+
var h, u = h[c];
|
|
644
|
+
if ((u = u || (h = e.languages.insertBefore(d, "comment", { "doc-comment": { pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/, lookbehind: !0, alias: "comment" } }))[c]) instanceof RegExp && (u = h[c] = { pattern: u }), Array.isArray(u))
|
|
645
|
+
for (var g = 0, b = u.length; g < b; g++)
|
|
646
|
+
u[g] instanceof RegExp && (u[g] = { pattern: u[g] }), m(u[g]);
|
|
573
647
|
else
|
|
574
|
-
|
|
648
|
+
m(u);
|
|
575
649
|
}
|
|
576
650
|
});
|
|
577
651
|
} }), t.addSupport(["java", "javascript", "php"], t);
|
|
@@ -582,25 +656,25 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
582
656
|
var t = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, t = (e.languages.css.selector = { pattern: e.languages.css.selector.pattern, lookbehind: !0, inside: t = { "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, "pseudo-class": /:[-\w]+/, class: /\.[-\w]+/, id: /#[-\w]+/, attribute: { pattern: RegExp(`\\[(?:[^[\\]"']|` + t.source + ")*\\]"), greedy: !0, inside: { punctuation: /^\[|\]$/, "case-sensitivity": { pattern: /(\s)[si]$/i, lookbehind: !0, alias: "keyword" }, namespace: { pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/, lookbehind: !0, inside: { punctuation: /\|$/ } }, "attr-name": { pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/, lookbehind: !0 }, "attr-value": [t, { pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/, lookbehind: !0 }], operator: /[|~*^$]?=/ } }, "n-th": [{ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: !0, inside: { number: /[\dn]+/, operator: /[+-]/ } }, { pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: !0 }], combinator: />|\+|~|\|\|/, punctuation: /[(),]/ } }, e.languages.css.atrule.inside["selector-function-argument"].inside = t, e.languages.insertBefore("css", "property", { variable: { pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i, lookbehind: !0 } }), { pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/, lookbehind: !0 }), a = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: !0 };
|
|
583
657
|
e.languages.insertBefore("css", "function", { operator: { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: !0 }, hexcode: { pattern: /\B#[\da-f]{3,8}\b/i, alias: "color" }, color: [{ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i, lookbehind: !0 }, { pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { unit: t, number: a, function: /[\w-]+(?=\()/, punctuation: /[(),]/ } }], entity: /\\[\da-f]{1,8}/i, unit: t, number: a });
|
|
584
658
|
}(o), function(e) {
|
|
585
|
-
var t = /[*&][^\s[\]{},]+/, a = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,
|
|
659
|
+
var t = /[*&][^\s[\]{},]+/, a = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, i = "(?:" + a.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + a.source + ")?)", d = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
|
|
586
660
|
return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
|
|
587
|
-
}),
|
|
588
|
-
function
|
|
589
|
-
|
|
661
|
+
}), m = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
|
|
662
|
+
function c(h, u) {
|
|
663
|
+
u = (u || "").replace(/m/g, "") + "m";
|
|
590
664
|
var g = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
|
|
591
|
-
return
|
|
665
|
+
return i;
|
|
592
666
|
}).replace(/<<value>>/g, function() {
|
|
593
|
-
return
|
|
667
|
+
return h;
|
|
594
668
|
});
|
|
595
|
-
return RegExp(g,
|
|
669
|
+
return RegExp(g, u);
|
|
596
670
|
}
|
|
597
671
|
e.languages.yaml = { scalar: { pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
|
|
598
|
-
return
|
|
672
|
+
return i;
|
|
599
673
|
})), lookbehind: !0, alias: "string" }, comment: /#.*/, key: { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
|
|
600
|
-
return
|
|
674
|
+
return i;
|
|
601
675
|
}).replace(/<<key>>/g, function() {
|
|
602
|
-
return "(?:" + d + "|" +
|
|
603
|
-
})), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern:
|
|
676
|
+
return "(?:" + d + "|" + m + ")";
|
|
677
|
+
})), lookbehind: !0, greedy: !0, alias: "atrule" }, directive: { pattern: /(^[ \t]*)%.+/m, lookbehind: !0, alias: "important" }, datetime: { pattern: c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source), lookbehind: !0, alias: "number" }, boolean: { pattern: c(/false|true/.source, "i"), lookbehind: !0, alias: "important" }, null: { pattern: c(/null|~/.source, "i"), lookbehind: !0, alias: "important" }, string: { pattern: c(m), lookbehind: !0, greedy: !0 }, number: { pattern: c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"), lookbehind: !0 }, tag: a, important: t, punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ }, e.languages.yml = e.languages.yaml;
|
|
604
678
|
}(o), function(e) {
|
|
605
679
|
var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
|
606
680
|
function a(g) {
|
|
@@ -608,24 +682,24 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
608
682
|
return t;
|
|
609
683
|
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + g + ")");
|
|
610
684
|
}
|
|
611
|
-
var
|
|
612
|
-
return
|
|
613
|
-
}),
|
|
685
|
+
var i = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, d = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
686
|
+
return i;
|
|
687
|
+
}), m = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, c = (e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", { "front-matter-block": { pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, lookbehind: !0, greedy: !0, inside: { punctuation: /^---|---$/, "front-matter": { pattern: /\S+(?:\s+\S+)*/, alias: ["yaml", "language-yaml"], inside: e.languages.yaml } } }, blockquote: { pattern: /^>(?:[\t ]*>)*/m, alias: "punctuation" }, table: { pattern: RegExp("^" + d + m + "(?:" + d + ")*", "m"), inside: { "table-data-rows": { pattern: RegExp("^(" + d + m + ")(?:" + d + ")*$"), lookbehind: !0, inside: { "table-data": { pattern: RegExp(i), inside: e.languages.markdown }, punctuation: /\|/ } }, "table-line": { pattern: RegExp("^(" + d + ")" + m + "$"), lookbehind: !0, inside: { punctuation: /\||:?-{3,}:?/ } }, "table-header-row": { pattern: RegExp("^" + d + "$"), inside: { "table-header": { pattern: RegExp(i), alias: "important", inside: e.languages.markdown }, punctuation: /\|/ } } } }, code: [{ pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, lookbehind: !0, alias: "keyword" }, { pattern: /^```[\s\S]*?^```$/m, greedy: !0, inside: { "code-block": { pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, lookbehind: !0 }, "code-language": { pattern: /^(```).+/, lookbehind: !0 }, punctuation: /```/ } }], title: [{ pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, alias: "important", inside: { punctuation: /==+$|--+$/ } }, { pattern: /(^\s*)#.+/m, lookbehind: !0, alias: "important", inside: { punctuation: /^#+|#+$/ } }], hr: { pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, lookbehind: !0, alias: "punctuation" }, list: { pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, lookbehind: !0, alias: "punctuation" }, "url-reference": { pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, inside: { variable: { pattern: /^(!?\[)[^\]]+/, lookbehind: !0 }, string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, punctuation: /^[\[\]!:]|[<>]/ }, alias: "url" }, bold: { pattern: a(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^..)[\s\S]+(?=..$)/, lookbehind: !0, inside: {} }, punctuation: /\*\*|__/ } }, italic: { pattern: a(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^.)[\s\S]+(?=.$)/, lookbehind: !0, inside: {} }, punctuation: /[*_]/ } }, strike: { pattern: a(/(~~?)(?:(?!~)<inner>)+\2/.source), lookbehind: !0, greedy: !0, inside: { content: { pattern: /(^~~?)[\s\S]+(?=\1$)/, lookbehind: !0, inside: {} }, punctuation: /~~?/ } }, "code-snippet": { pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, lookbehind: !0, greedy: !0, alias: ["code", "keyword"] }, url: { pattern: a(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source), lookbehind: !0, greedy: !0, inside: { operator: /^!/, content: { pattern: /(^\[)[^\]]+(?=\])/, lookbehind: !0, inside: {} }, variable: { pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, lookbehind: !0 }, url: { pattern: /(^\]\()[^\s)]+/, lookbehind: !0 }, string: { pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, lookbehind: !0 } } } }), ["url", "bold", "italic", "strike"].forEach(function(g) {
|
|
614
688
|
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(b) {
|
|
615
689
|
g !== b && (e.languages.markdown[g].inside.content.inside[b] = e.languages.markdown[b]);
|
|
616
690
|
});
|
|
617
691
|
}), e.hooks.add("after-tokenize", function(g) {
|
|
618
|
-
g.language !== "markdown" && g.language !== "md" || function b(
|
|
619
|
-
if (
|
|
620
|
-
for (var v = 0, w =
|
|
621
|
-
var n, r =
|
|
692
|
+
g.language !== "markdown" && g.language !== "md" || function b(f) {
|
|
693
|
+
if (f && typeof f != "string")
|
|
694
|
+
for (var v = 0, w = f.length; v < w; v++) {
|
|
695
|
+
var n, r = f[v];
|
|
622
696
|
r.type !== "code" ? b(r.content) : (n = r.content[1], r = r.content[3], n && r && n.type === "code-language" && r.type === "code-block" && typeof n.content == "string" && (n = n.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), n = "language-" + (n = (/[a-z][\w-]*/i.exec(n) || [""])[0].toLowerCase()), r.alias ? typeof r.alias == "string" ? r.alias = [r.alias, n] : r.alias.push(n) : r.alias = [n]));
|
|
623
697
|
}
|
|
624
698
|
}(g.tokens);
|
|
625
699
|
}), e.hooks.add("wrap", function(g) {
|
|
626
700
|
if (g.type === "code-block") {
|
|
627
|
-
for (var b = "",
|
|
628
|
-
var w = g.classes[
|
|
701
|
+
for (var b = "", f = 0, v = g.classes.length; f < v; f++) {
|
|
702
|
+
var w = g.classes[f], w = /language-(.+)/.exec(w);
|
|
629
703
|
if (w) {
|
|
630
704
|
b = w[1];
|
|
631
705
|
break;
|
|
@@ -633,41 +707,41 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
633
707
|
}
|
|
634
708
|
var n, r = e.languages[b];
|
|
635
709
|
r ? g.content = e.highlight(function(s) {
|
|
636
|
-
return s = s.replace(
|
|
637
|
-
var
|
|
638
|
-
return (
|
|
710
|
+
return s = s.replace(c, ""), s = s.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(p, l) {
|
|
711
|
+
var y;
|
|
712
|
+
return (l = l.toLowerCase())[0] === "#" ? (y = l[1] === "x" ? parseInt(l.slice(2), 16) : Number(l.slice(1)), u(y)) : h[l] || p;
|
|
639
713
|
});
|
|
640
714
|
}(g.content), r, b) : b && b !== "none" && e.plugins.autoloader && (n = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(1e16 * Math.random()), g.attributes.id = n, e.plugins.autoloader.loadLanguages(b, function() {
|
|
641
715
|
var s = document.getElementById(n);
|
|
642
716
|
s && (s.innerHTML = e.highlight(s.textContent, e.languages[b], b));
|
|
643
717
|
}));
|
|
644
718
|
}
|
|
645
|
-
}), RegExp(e.languages.markup.tag.pattern.source, "gi")),
|
|
719
|
+
}), RegExp(e.languages.markup.tag.pattern.source, "gi")), h = { amp: "&", lt: "<", gt: ">", quot: '"' }, u = String.fromCodePoint || String.fromCharCode;
|
|
646
720
|
e.languages.md = e.languages.markdown;
|
|
647
721
|
}(o), o.languages.graphql = { comment: /#.*/, description: { pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, greedy: !0, alias: "string", inside: { "language-markdown": { pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, lookbehind: !0, inside: o.languages.markdown } } }, string: { pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, greedy: !0 }, number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, boolean: /\b(?:false|true)\b/, variable: /\$[a-z_]\w*/i, directive: { pattern: /@[a-z_]\w*/i, alias: "function" }, "attr-name": { pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, greedy: !0 }, "atom-input": { pattern: /\b[A-Z]\w*Input\b/, alias: "class-name" }, scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, constant: /\b[A-Z][A-Z_\d]*\b/, "class-name": { pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, lookbehind: !0 }, fragment: { pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-mutation": { pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, "definition-query": { pattern: /(\bquery\s+)[a-zA-Z_]\w*/, lookbehind: !0, alias: "function" }, keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, operator: /[!=|&]|\.{3}/, "property-query": /\w+(?=\s*\()/, object: /\w+(?=\s*\{)/, punctuation: /[!(){}\[\]:=,]/, property: /\w+/ }, o.hooks.add("after-tokenize", function(e) {
|
|
648
722
|
if (e.language === "graphql")
|
|
649
723
|
for (var t = e.tokens.filter(function(n) {
|
|
650
724
|
return typeof n != "string" && n.type !== "comment" && n.type !== "scalar";
|
|
651
725
|
}), a = 0; a < t.length; ) {
|
|
652
|
-
var
|
|
653
|
-
if (
|
|
726
|
+
var i = t[a++];
|
|
727
|
+
if (i.type === "keyword" && i.content === "mutation") {
|
|
654
728
|
var d = [];
|
|
655
|
-
if (
|
|
729
|
+
if (f(["definition-mutation", "punctuation"]) && b(1).content === "(") {
|
|
656
730
|
a += 2;
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
731
|
+
var m = v(/^\($/, /^\)$/);
|
|
732
|
+
if (m === -1)
|
|
659
733
|
continue;
|
|
660
|
-
for (; a <
|
|
661
|
-
var
|
|
662
|
-
|
|
734
|
+
for (; a < m; a++) {
|
|
735
|
+
var c = b(0);
|
|
736
|
+
c.type === "variable" && (w(c, "variable-input"), d.push(c.content));
|
|
663
737
|
}
|
|
664
|
-
a =
|
|
738
|
+
a = m + 1;
|
|
665
739
|
}
|
|
666
|
-
if (
|
|
667
|
-
var
|
|
668
|
-
if (
|
|
669
|
-
for (var
|
|
670
|
-
var g = t[
|
|
740
|
+
if (f(["punctuation", "property-query"]) && b(0).content === "{" && (a++, w(b(0), "property-mutation"), 0 < d.length)) {
|
|
741
|
+
var h = v(/^\{$/, /^\}$/);
|
|
742
|
+
if (h !== -1)
|
|
743
|
+
for (var u = a; u < h; u++) {
|
|
744
|
+
var g = t[u];
|
|
671
745
|
g.type === "variable" && 0 <= d.indexOf(g.content) && w(g, "variable-input");
|
|
672
746
|
}
|
|
673
747
|
}
|
|
@@ -676,7 +750,7 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
676
750
|
function b(n) {
|
|
677
751
|
return t[a + n];
|
|
678
752
|
}
|
|
679
|
-
function
|
|
753
|
+
function f(n, r) {
|
|
680
754
|
r = r || 0;
|
|
681
755
|
for (var s = 0; s < n.length; s++) {
|
|
682
756
|
var p = b(s + r);
|
|
@@ -687,11 +761,11 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
687
761
|
}
|
|
688
762
|
function v(n, r) {
|
|
689
763
|
for (var s = 1, p = a; p < t.length; p++) {
|
|
690
|
-
var
|
|
691
|
-
if (
|
|
692
|
-
if (n.test(
|
|
764
|
+
var l = t[p], y = l.content;
|
|
765
|
+
if (l.type === "punctuation" && typeof y == "string") {
|
|
766
|
+
if (n.test(y))
|
|
693
767
|
s++;
|
|
694
|
-
else if (r.test(
|
|
768
|
+
else if (r.test(y) && --s === 0)
|
|
695
769
|
return p;
|
|
696
770
|
}
|
|
697
771
|
}
|
|
@@ -702,89 +776,89 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
702
776
|
s ? Array.isArray(s) || (n.alias = s = [s]) : n.alias = s = [], s.push(r);
|
|
703
777
|
}
|
|
704
778
|
}), o.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(e) {
|
|
705
|
-
var t = e.languages.javascript["template-string"], a = t.pattern.source,
|
|
706
|
-
function
|
|
707
|
-
if (e.languages[
|
|
708
|
-
return { pattern: RegExp("((?:" + v + ")\\s*)" + a), lookbehind: !0, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, "embedded-code": { pattern: /[\s\S]+/, alias:
|
|
779
|
+
var t = e.languages.javascript["template-string"], a = t.pattern.source, i = t.inside.interpolation, d = i.inside["interpolation-punctuation"], m = i.pattern.source;
|
|
780
|
+
function c(f, v) {
|
|
781
|
+
if (e.languages[f])
|
|
782
|
+
return { pattern: RegExp("((?:" + v + ")\\s*)" + a), lookbehind: !0, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, "embedded-code": { pattern: /[\s\S]+/, alias: f } } };
|
|
709
783
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
784
|
+
function h(f, v, w) {
|
|
785
|
+
return f = { code: f, grammar: v, language: w }, e.hooks.run("before-tokenize", f), f.tokens = e.tokenize(f.code, f.grammar), e.hooks.run("after-tokenize", f), f.tokens;
|
|
712
786
|
}
|
|
713
|
-
function
|
|
714
|
-
var s = e.tokenize(
|
|
715
|
-
if (typeof
|
|
716
|
-
return
|
|
717
|
-
for (var
|
|
787
|
+
function u(f, v, w) {
|
|
788
|
+
var s = e.tokenize(f, { interpolation: { pattern: RegExp(m), lookbehind: !0 } }), n = 0, r = {}, s = h(s.map(function(l) {
|
|
789
|
+
if (typeof l == "string")
|
|
790
|
+
return l;
|
|
791
|
+
for (var y, E, l = l.content; f.indexOf((E = n++, y = "___" + w.toUpperCase() + "_" + E + "___")) !== -1; )
|
|
718
792
|
;
|
|
719
|
-
return r[
|
|
793
|
+
return r[y] = l, y;
|
|
720
794
|
}).join(""), v, w), p = Object.keys(r);
|
|
721
|
-
return n = 0, function
|
|
722
|
-
for (var E = 0; E <
|
|
795
|
+
return n = 0, function l(y) {
|
|
796
|
+
for (var E = 0; E < y.length; E++) {
|
|
723
797
|
if (n >= p.length)
|
|
724
798
|
return;
|
|
725
|
-
var k, x, S, F, A,
|
|
726
|
-
typeof O == "string" || typeof O.content == "string" ? (k = p[n], (T = (
|
|
799
|
+
var k, x, S, F, A, N, T, O = y[E];
|
|
800
|
+
typeof O == "string" || typeof O.content == "string" ? (k = p[n], (T = (N = typeof O == "string" ? O : O.content).indexOf(k)) !== -1 && (++n, x = N.substring(0, T), A = r[k], S = void 0, (F = {})["interpolation-punctuation"] = d, (F = e.tokenize(A, F)).length === 3 && ((S = [1, 1]).push.apply(S, h(F[1], e.languages.javascript, "javascript")), F.splice.apply(F, S)), S = new e.Token("interpolation", F, i.alias, A), F = N.substring(T + k.length), A = [], x && A.push(x), A.push(S), F && (l(N = [F]), A.push.apply(A, N)), typeof O == "string" ? (y.splice.apply(y, [E, 1].concat(A)), E += A.length - 1) : O.content = A)) : (T = O.content, Array.isArray(T) ? l(T) : l([T]));
|
|
727
801
|
}
|
|
728
|
-
}(s), new e.Token(w, s, "language-" + w,
|
|
802
|
+
}(s), new e.Token(w, s, "language-" + w, f);
|
|
729
803
|
}
|
|
730
|
-
e.languages.javascript["template-string"] = [
|
|
804
|
+
e.languages.javascript["template-string"] = [c("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source), c("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source), c("svg", /\bsvg/.source), c("markdown", /\b(?:markdown|md)/.source), c("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source), c("sql", /\bsql/.source), t].filter(Boolean);
|
|
731
805
|
var g = { javascript: !0, js: !0, typescript: !0, ts: !0, jsx: !0, tsx: !0 };
|
|
732
|
-
function b(
|
|
733
|
-
return typeof
|
|
806
|
+
function b(f) {
|
|
807
|
+
return typeof f == "string" ? f : Array.isArray(f) ? f.map(b).join("") : b(f.content);
|
|
734
808
|
}
|
|
735
|
-
e.hooks.add("after-tokenize", function(
|
|
736
|
-
|
|
809
|
+
e.hooks.add("after-tokenize", function(f) {
|
|
810
|
+
f.language in g && function v(w) {
|
|
737
811
|
for (var n = 0, r = w.length; n < r; n++) {
|
|
738
|
-
var s, p,
|
|
739
|
-
typeof
|
|
812
|
+
var s, p, l, y = w[n];
|
|
813
|
+
typeof y != "string" && (s = y.content, Array.isArray(s) ? y.type === "template-string" ? (y = s[1], s.length === 3 && typeof y != "string" && y.type === "embedded-code" && (p = b(y), y = y.alias, y = Array.isArray(y) ? y[0] : y, l = e.languages[y]) && (s[1] = u(p, l, y))) : v(s) : typeof s != "string" && v([s]));
|
|
740
814
|
}
|
|
741
|
-
}(
|
|
815
|
+
}(f.tokens);
|
|
742
816
|
});
|
|
743
817
|
}(o), function(e) {
|
|
744
818
|
e.languages.typescript = e.languages.extend("javascript", { "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, lookbehind: !0, greedy: !0, inside: null }, builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
|
|
745
819
|
var t = e.languages.extend("typescript", {});
|
|
746
820
|
delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", { decorator: { pattern: /@[$\w\xA0-\uFFFF]+/, inside: { at: { pattern: /^@/, alias: "operator" }, function: /^[\s\S]+/ } }, "generic-function": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, greedy: !0, inside: { function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: t } } } }), e.languages.ts = e.languages.typescript;
|
|
747
821
|
}(o), function(e) {
|
|
748
|
-
var t = e.languages.javascript, a = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,
|
|
749
|
-
e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: { pattern: RegExp(
|
|
822
|
+
var t = e.languages.javascript, a = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, i = "(@(?:arg|argument|param|property)\\s+(?:" + a + "\\s+)?)";
|
|
823
|
+
e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: { pattern: RegExp(i + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source), lookbehind: !0, inside: { punctuation: /\./ } } }), e.languages.insertBefore("jsdoc", "keyword", { "optional-parameter": { pattern: RegExp(i + /\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source), lookbehind: !0, inside: { parameter: { pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/, lookbehind: !0, inside: { punctuation: /\./ } }, code: { pattern: /(=)[\s\S]*(?=\]$)/, lookbehind: !0, inside: t, alias: "language-javascript" }, punctuation: /[=[\]]/ } }, "class-name": [{ pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g, function() {
|
|
750
824
|
return a;
|
|
751
825
|
})), lookbehind: !0, inside: { punctuation: /\./ } }, { pattern: RegExp("(@[a-z]+\\s+)" + a), lookbehind: !0, inside: { string: t.string, number: t.number, boolean: t.boolean, keyword: e.languages.typescript.keyword, operator: /=>|\.\.\.|[&|?:*]/, punctuation: /[.,;=<>{}()[\]]/ } }], example: { pattern: /(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/, lookbehind: !0, inside: { code: { pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m, lookbehind: !0, inside: t, alias: "language-javascript" } } } }), e.languages.javadoclike.addSupport("javascript", e.languages.jsdoc);
|
|
752
826
|
}(o), function(e) {
|
|
753
827
|
e.languages.flow = e.languages.extend("javascript", {}), e.languages.insertBefore("flow", "keyword", { type: [{ pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/, alias: "class-name" }] }), e.languages.flow["function-variable"].pattern = /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i, delete e.languages.flow.parameter, e.languages.insertBefore("flow", "operator", { "flow-punctuation": { pattern: /\{\||\|\}/, alias: "punctuation" } }), Array.isArray(e.languages.flow.keyword) || (e.languages.flow.keyword = [e.languages.flow.keyword]), e.languages.flow.keyword.unshift({ pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/, lookbehind: !0 }, { pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/, lookbehind: !0 });
|
|
754
828
|
}(o), o.languages.n4js = o.languages.extend("javascript", { keyword: /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }), o.languages.insertBefore("n4js", "constant", { annotation: { pattern: /@+\w+/, alias: "operator" } }), o.languages.n4jsd = o.languages.n4js, function(e) {
|
|
755
|
-
function t(
|
|
756
|
-
return RegExp(
|
|
829
|
+
function t(c, h) {
|
|
830
|
+
return RegExp(c.replace(/<ID>/g, function() {
|
|
757
831
|
return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
|
|
758
|
-
}),
|
|
832
|
+
}), h);
|
|
759
833
|
}
|
|
760
834
|
e.languages.insertBefore("javascript", "function-variable", { "method-variable": { pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source), lookbehind: !0, alias: ["function-variable", "method", "function", "property-access"] } }), e.languages.insertBefore("javascript", "function", { method: { pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source), lookbehind: !0, alias: ["function", "property-access"] } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{ pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, alias: "class-name" }, { pattern: /\b(?:[A-Z]\w*)Error\b/, alias: "class-name" }] }), e.languages.insertBefore("javascript", "keyword", { imports: { pattern: t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source), lookbehind: !0, inside: e.languages.javascript }, exports: { pattern: t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source), lookbehind: !0, inside: e.languages.javascript } }), e.languages.javascript.keyword.unshift({ pattern: /\b(?:as|default|export|from|import)\b/, alias: "module" }, { pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, alias: "control-flow" }, { pattern: /\bnull\b/, alias: ["null", "nil"] }, { pattern: /\bundefined\b/, alias: "nil" }), e.languages.insertBefore("javascript", "operator", { spread: { pattern: /\.{3}/, alias: "operator" }, arrow: { pattern: /=>/, alias: "operator" } }), e.languages.insertBefore("javascript", "punctuation", { "property-access": { pattern: t(/(\.\s*)#?<ID>/.source), lookbehind: !0 }, "maybe-class-name": { pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, lookbehind: !0 }, dom: { pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, alias: "variable" }, console: { pattern: /\bconsole(?=\s*\.)/, alias: "class-name" } });
|
|
761
|
-
for (var a = ["function", "function-variable", "method", "method-variable", "property-access"],
|
|
762
|
-
var
|
|
763
|
-
(d.inside =
|
|
835
|
+
for (var a = ["function", "function-variable", "method", "method-variable", "property-access"], i = 0; i < a.length; i++) {
|
|
836
|
+
var m = a[i], d = e.languages.javascript[m], m = (d = e.util.type(d) === "RegExp" ? e.languages.javascript[m] = { pattern: d } : d).inside || {};
|
|
837
|
+
(d.inside = m)["maybe-class-name"] = /^[A-Z][\s\S]*/;
|
|
764
838
|
}
|
|
765
839
|
}(o), function(e) {
|
|
766
|
-
var t = e.util.clone(e.languages.javascript), a = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,
|
|
767
|
-
function
|
|
768
|
-
return
|
|
840
|
+
var t = e.util.clone(e.languages.javascript), a = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, i = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, d = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
|
|
841
|
+
function m(u, g) {
|
|
842
|
+
return u = u.replace(/<S>/g, function() {
|
|
769
843
|
return a;
|
|
770
844
|
}).replace(/<BRACES>/g, function() {
|
|
771
|
-
return
|
|
845
|
+
return i;
|
|
772
846
|
}).replace(/<SPREAD>/g, function() {
|
|
773
847
|
return d;
|
|
774
|
-
}), RegExp(
|
|
848
|
+
}), RegExp(u, g);
|
|
775
849
|
}
|
|
776
|
-
d =
|
|
777
|
-
function u
|
|
778
|
-
for (var g = [], b = 0; b <
|
|
779
|
-
var
|
|
780
|
-
typeof
|
|
850
|
+
d = m(d).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = m(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = t.comment, e.languages.insertBefore("inside", "attr-name", { spread: { pattern: m(/<SPREAD>/.source), inside: e.languages.jsx } }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", { script: { pattern: m(/=<BRACES>/.source), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: e.languages.jsx } } }, e.languages.jsx.tag);
|
|
851
|
+
function c(u) {
|
|
852
|
+
for (var g = [], b = 0; b < u.length; b++) {
|
|
853
|
+
var f = u[b], v = !1;
|
|
854
|
+
typeof f != "string" && (f.type === "tag" && f.content[0] && f.content[0].type === "tag" ? f.content[0].content[0].content === "</" ? 0 < g.length && g[g.length - 1].tagName === h(f.content[0].content[1]) && g.pop() : f.content[f.content.length - 1].content !== "/>" && g.push({ tagName: h(f.content[0].content[1]), openedBraces: 0 }) : 0 < g.length && f.type === "punctuation" && f.content === "{" ? g[g.length - 1].openedBraces++ : 0 < g.length && 0 < g[g.length - 1].openedBraces && f.type === "punctuation" && f.content === "}" ? g[g.length - 1].openedBraces-- : v = !0), (v || typeof f == "string") && 0 < g.length && g[g.length - 1].openedBraces === 0 && (v = h(f), b < u.length - 1 && (typeof u[b + 1] == "string" || u[b + 1].type === "plain-text") && (v += h(u[b + 1]), u.splice(b + 1, 1)), 0 < b && (typeof u[b - 1] == "string" || u[b - 1].type === "plain-text") && (v = h(u[b - 1]) + v, u.splice(b - 1, 1), b--), u[b] = new e.Token("plain-text", v, null, v)), f.content && typeof f.content != "string" && c(f.content);
|
|
781
855
|
}
|
|
782
856
|
}
|
|
783
|
-
var
|
|
784
|
-
return
|
|
857
|
+
var h = function(u) {
|
|
858
|
+
return u ? typeof u == "string" ? u : typeof u.content == "string" ? u.content : u.content.map(h).join("") : "";
|
|
785
859
|
};
|
|
786
|
-
e.hooks.add("after-tokenize", function(
|
|
787
|
-
|
|
860
|
+
e.hooks.add("after-tokenize", function(u) {
|
|
861
|
+
u.language !== "jsx" && u.language !== "tsx" || c(u.tokens);
|
|
788
862
|
});
|
|
789
863
|
}(o), function(e) {
|
|
790
864
|
var t = e.util.clone(e.languages.typescript), t = (e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"], e.languages.tsx.tag);
|
|
@@ -813,30 +887,30 @@ o.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy
|
|
|
813
887
|
return a;
|
|
814
888
|
}) + ")"), lookbehind: !0, greedy: !0, inside: { string: /^[<"][\s\S]+/, operator: /:/, punctuation: /\./ } }, "raw-string": { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: "string", greedy: !0 } }), e.languages.insertBefore("cpp", "keyword", { "generic-function": { pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { function: /^\w+/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: e.languages.cpp } } } }), e.languages.insertBefore("cpp", "operator", { "double-colon": { pattern: /::/, alias: "punctuation" } }), e.languages.insertBefore("cpp", "class-name", { "base-clause": { pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/, lookbehind: !0, greedy: !0, inside: e.languages.extend("cpp", {}) } }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
|
|
815
889
|
}(o), o.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, o.languages.python["string-interpolation"].inside.interpolation.inside.rest = o.languages.python, o.languages.py = o.languages.python, o.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, o.languages.webmanifest = o.languages.json;
|
|
816
|
-
var
|
|
817
|
-
|
|
818
|
-
dracula: () =>
|
|
819
|
-
duotoneDark: () =>
|
|
820
|
-
duotoneLight: () =>
|
|
821
|
-
github: () =>
|
|
822
|
-
gruvboxMaterialDark: () =>
|
|
823
|
-
gruvboxMaterialLight: () =>
|
|
824
|
-
jettwaveDark: () =>
|
|
825
|
-
jettwaveLight: () =>
|
|
826
|
-
nightOwl: () =>
|
|
827
|
-
nightOwlLight: () =>
|
|
828
|
-
oceanicNext: () =>
|
|
829
|
-
okaidia: () =>
|
|
830
|
-
oneDark: () =>
|
|
831
|
-
oneLight: () =>
|
|
832
|
-
palenight: () =>
|
|
833
|
-
shadesOfPurple: () =>
|
|
834
|
-
synthwave84: () =>
|
|
835
|
-
ultramin: () =>
|
|
836
|
-
vsDark: () =>
|
|
837
|
-
vsLight: () =>
|
|
890
|
+
var Q = {};
|
|
891
|
+
Pe(Q, {
|
|
892
|
+
dracula: () => Ge,
|
|
893
|
+
duotoneDark: () => We,
|
|
894
|
+
duotoneLight: () => He,
|
|
895
|
+
github: () => Ke,
|
|
896
|
+
gruvboxMaterialDark: () => St,
|
|
897
|
+
gruvboxMaterialLight: () => _t,
|
|
898
|
+
jettwaveDark: () => bt,
|
|
899
|
+
jettwaveLight: () => ht,
|
|
900
|
+
nightOwl: () => Xe,
|
|
901
|
+
nightOwlLight: () => Je,
|
|
902
|
+
oceanicNext: () => tt,
|
|
903
|
+
okaidia: () => nt,
|
|
904
|
+
oneDark: () => kt,
|
|
905
|
+
oneLight: () => Et,
|
|
906
|
+
palenight: () => ot,
|
|
907
|
+
shadesOfPurple: () => lt,
|
|
908
|
+
synthwave84: () => ut,
|
|
909
|
+
ultramin: () => pt,
|
|
910
|
+
vsDark: () => fe,
|
|
911
|
+
vsLight: () => yt
|
|
838
912
|
});
|
|
839
|
-
var
|
|
913
|
+
var Ue = {
|
|
840
914
|
plain: {
|
|
841
915
|
color: "#F8F8F2",
|
|
842
916
|
backgroundColor: "#282A36"
|
|
@@ -898,7 +972,7 @@ var Ne = {
|
|
|
898
972
|
}
|
|
899
973
|
}
|
|
900
974
|
]
|
|
901
|
-
},
|
|
975
|
+
}, Ge = Ue, Ze = {
|
|
902
976
|
plain: {
|
|
903
977
|
backgroundColor: "#2a2734",
|
|
904
978
|
color: "#9a86fd"
|
|
@@ -992,7 +1066,7 @@ var Ne = {
|
|
|
992
1066
|
}
|
|
993
1067
|
}
|
|
994
1068
|
]
|
|
995
|
-
},
|
|
1069
|
+
}, We = Ze, qe = {
|
|
996
1070
|
plain: {
|
|
997
1071
|
backgroundColor: "#faf8f5",
|
|
998
1072
|
color: "#728fcb"
|
|
@@ -1090,7 +1164,7 @@ var Ne = {
|
|
|
1090
1164
|
}
|
|
1091
1165
|
}
|
|
1092
1166
|
]
|
|
1093
|
-
},
|
|
1167
|
+
}, He = qe, Ye = {
|
|
1094
1168
|
plain: {
|
|
1095
1169
|
color: "#393A34",
|
|
1096
1170
|
backgroundColor: "#f6f8fa"
|
|
@@ -1163,7 +1237,7 @@ var Ne = {
|
|
|
1163
1237
|
}
|
|
1164
1238
|
}
|
|
1165
1239
|
]
|
|
1166
|
-
},
|
|
1240
|
+
}, Ke = Ye, Ve = {
|
|
1167
1241
|
plain: {
|
|
1168
1242
|
color: "#d6deeb",
|
|
1169
1243
|
backgroundColor: "#011627"
|
|
@@ -1267,7 +1341,7 @@ var Ne = {
|
|
|
1267
1341
|
}
|
|
1268
1342
|
}
|
|
1269
1343
|
]
|
|
1270
|
-
},
|
|
1344
|
+
}, Xe = Ve, Qe = {
|
|
1271
1345
|
plain: {
|
|
1272
1346
|
color: "#403f53",
|
|
1273
1347
|
backgroundColor: "#FBFBFB"
|
|
@@ -1359,7 +1433,7 @@ var Ne = {
|
|
|
1359
1433
|
}
|
|
1360
1434
|
}
|
|
1361
1435
|
]
|
|
1362
|
-
},
|
|
1436
|
+
}, Je = Qe, L = {
|
|
1363
1437
|
char: "#D8DEE9",
|
|
1364
1438
|
comment: "#999999",
|
|
1365
1439
|
keyword: "#c5a5c5",
|
|
@@ -1367,13 +1441,10 @@ var Ne = {
|
|
|
1367
1441
|
string: "#8dc891",
|
|
1368
1442
|
variable: "#d7deea",
|
|
1369
1443
|
boolean: "#ff8b50",
|
|
1370
|
-
punctuation: "#5FB3B3",
|
|
1371
1444
|
tag: "#fc929e",
|
|
1372
1445
|
function: "#79b6f2",
|
|
1373
|
-
className: "#FAC863"
|
|
1374
|
-
|
|
1375
|
-
operator: "#fc929e"
|
|
1376
|
-
}, qe = {
|
|
1446
|
+
className: "#FAC863"
|
|
1447
|
+
}, et = {
|
|
1377
1448
|
plain: {
|
|
1378
1449
|
backgroundColor: "#282c34",
|
|
1379
1450
|
color: "#ffffff"
|
|
@@ -1496,7 +1567,7 @@ var Ne = {
|
|
|
1496
1567
|
}
|
|
1497
1568
|
}
|
|
1498
1569
|
]
|
|
1499
|
-
},
|
|
1570
|
+
}, tt = et, at = {
|
|
1500
1571
|
plain: {
|
|
1501
1572
|
color: "#f8f8f2",
|
|
1502
1573
|
backgroundColor: "#272822"
|
|
@@ -1611,7 +1682,7 @@ var Ne = {
|
|
|
1611
1682
|
}
|
|
1612
1683
|
}
|
|
1613
1684
|
]
|
|
1614
|
-
},
|
|
1685
|
+
}, nt = at, rt = {
|
|
1615
1686
|
plain: {
|
|
1616
1687
|
color: "#bfc7d5",
|
|
1617
1688
|
backgroundColor: "#292d3e"
|
|
@@ -1704,7 +1775,7 @@ var Ne = {
|
|
|
1704
1775
|
}
|
|
1705
1776
|
}
|
|
1706
1777
|
]
|
|
1707
|
-
},
|
|
1778
|
+
}, ot = rt, st = {
|
|
1708
1779
|
plain: {
|
|
1709
1780
|
color: "#9EFEFF",
|
|
1710
1781
|
backgroundColor: "#2D2A55"
|
|
@@ -1792,7 +1863,7 @@ var Ne = {
|
|
|
1792
1863
|
}
|
|
1793
1864
|
}
|
|
1794
1865
|
]
|
|
1795
|
-
},
|
|
1866
|
+
}, lt = st, it = {
|
|
1796
1867
|
plain: {
|
|
1797
1868
|
backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
|
|
1798
1869
|
backgroundImage: "#34294f",
|
|
@@ -1917,7 +1988,7 @@ var Ne = {
|
|
|
1917
1988
|
}
|
|
1918
1989
|
}
|
|
1919
1990
|
]
|
|
1920
|
-
},
|
|
1991
|
+
}, ut = it, ct = {
|
|
1921
1992
|
plain: {
|
|
1922
1993
|
color: "#282a2e",
|
|
1923
1994
|
backgroundColor: "#ffffff"
|
|
@@ -1942,7 +2013,7 @@ var Ne = {
|
|
|
1942
2013
|
}
|
|
1943
2014
|
}
|
|
1944
2015
|
]
|
|
1945
|
-
},
|
|
2016
|
+
}, pt = ct, dt = {
|
|
1946
2017
|
plain: {
|
|
1947
2018
|
color: "#9CDCFE",
|
|
1948
2019
|
backgroundColor: "#1E1E1E"
|
|
@@ -2044,7 +2115,7 @@ var Ne = {
|
|
|
2044
2115
|
}
|
|
2045
2116
|
}
|
|
2046
2117
|
]
|
|
2047
|
-
},
|
|
2118
|
+
}, fe = dt, gt = {
|
|
2048
2119
|
plain: {
|
|
2049
2120
|
color: "#000000",
|
|
2050
2121
|
backgroundColor: "#ffffff"
|
|
@@ -2117,7 +2188,7 @@ var Ne = {
|
|
|
2117
2188
|
}
|
|
2118
2189
|
}
|
|
2119
2190
|
]
|
|
2120
|
-
},
|
|
2191
|
+
}, yt = gt, ft = {
|
|
2121
2192
|
plain: {
|
|
2122
2193
|
color: "#f8fafc",
|
|
2123
2194
|
backgroundColor: "#011627"
|
|
@@ -2216,7 +2287,7 @@ var Ne = {
|
|
|
2216
2287
|
}
|
|
2217
2288
|
}
|
|
2218
2289
|
]
|
|
2219
|
-
},
|
|
2290
|
+
}, bt = ft, mt = {
|
|
2220
2291
|
plain: {
|
|
2221
2292
|
color: "#0f172a",
|
|
2222
2293
|
backgroundColor: "#f1f5f9"
|
|
@@ -2315,7 +2386,7 @@ var Ne = {
|
|
|
2315
2386
|
}
|
|
2316
2387
|
}
|
|
2317
2388
|
]
|
|
2318
|
-
},
|
|
2389
|
+
}, ht = mt, vt = {
|
|
2319
2390
|
plain: {
|
|
2320
2391
|
backgroundColor: "hsl(220, 13%, 18%)",
|
|
2321
2392
|
color: "hsl(220, 14%, 71%)",
|
|
@@ -2413,7 +2484,7 @@ var Ne = {
|
|
|
2413
2484
|
}
|
|
2414
2485
|
}
|
|
2415
2486
|
]
|
|
2416
|
-
},
|
|
2487
|
+
}, kt = vt, wt = {
|
|
2417
2488
|
plain: {
|
|
2418
2489
|
backgroundColor: "hsl(230, 1%, 98%)",
|
|
2419
2490
|
color: "hsl(230, 8%, 24%)"
|
|
@@ -2514,7 +2585,7 @@ var Ne = {
|
|
|
2514
2585
|
}
|
|
2515
2586
|
}
|
|
2516
2587
|
]
|
|
2517
|
-
},
|
|
2588
|
+
}, Et = wt, xt = {
|
|
2518
2589
|
plain: {
|
|
2519
2590
|
color: "#ebdbb2",
|
|
2520
2591
|
backgroundColor: "#292828"
|
|
@@ -2587,7 +2658,7 @@ var Ne = {
|
|
|
2587
2658
|
}
|
|
2588
2659
|
}
|
|
2589
2660
|
]
|
|
2590
|
-
},
|
|
2661
|
+
}, St = xt, At = {
|
|
2591
2662
|
plain: {
|
|
2592
2663
|
color: "#654735",
|
|
2593
2664
|
backgroundColor: "#f9f5d7"
|
|
@@ -2659,46 +2730,46 @@ var Ne = {
|
|
|
2659
2730
|
}
|
|
2660
2731
|
}
|
|
2661
2732
|
]
|
|
2662
|
-
},
|
|
2733
|
+
}, _t = At, Ft = (e) => X(
|
|
2663
2734
|
(t) => {
|
|
2664
|
-
var a = t, { className:
|
|
2665
|
-
const
|
|
2666
|
-
className: ce("token-line",
|
|
2735
|
+
var a = t, { className: i, style: d, line: m } = a, c = ye(a, ["className", "style", "line"]);
|
|
2736
|
+
const h = q(B({}, c), {
|
|
2737
|
+
className: ce("token-line", i)
|
|
2667
2738
|
});
|
|
2668
|
-
return typeof e == "object" && "plain" in e && (
|
|
2739
|
+
return typeof e == "object" && "plain" in e && (h.style = e.plain), typeof d == "object" && (h.style = B(B({}, h.style || {}), d)), h;
|
|
2669
2740
|
},
|
|
2670
2741
|
[e]
|
|
2671
|
-
),
|
|
2672
|
-
const t =
|
|
2673
|
-
({ types: a, empty:
|
|
2742
|
+
), Tt = (e) => {
|
|
2743
|
+
const t = X(
|
|
2744
|
+
({ types: a, empty: i }) => {
|
|
2674
2745
|
if (e != null) {
|
|
2675
2746
|
{
|
|
2676
2747
|
if (a.length === 1 && a[0] === "plain")
|
|
2677
|
-
return
|
|
2678
|
-
if (a.length === 1 &&
|
|
2748
|
+
return i != null ? { display: "inline-block" } : void 0;
|
|
2749
|
+
if (a.length === 1 && i != null)
|
|
2679
2750
|
return e[a[0]];
|
|
2680
2751
|
}
|
|
2681
2752
|
return Object.assign(
|
|
2682
|
-
|
|
2753
|
+
i != null ? { display: "inline-block" } : {},
|
|
2683
2754
|
...a.map((d) => e[d])
|
|
2684
2755
|
);
|
|
2685
2756
|
}
|
|
2686
2757
|
},
|
|
2687
2758
|
[e]
|
|
2688
2759
|
);
|
|
2689
|
-
return
|
|
2760
|
+
return X(
|
|
2690
2761
|
(a) => {
|
|
2691
|
-
var
|
|
2692
|
-
const
|
|
2693
|
-
className: ce("token", ...d.types,
|
|
2762
|
+
var i = a, { token: d, className: m, style: c } = i, h = ye(i, ["token", "className", "style"]);
|
|
2763
|
+
const u = q(B({}, h), {
|
|
2764
|
+
className: ce("token", ...d.types, m),
|
|
2694
2765
|
children: d.content,
|
|
2695
2766
|
style: t(d)
|
|
2696
2767
|
});
|
|
2697
|
-
return
|
|
2768
|
+
return c != null && (u.style = B(B({}, u.style || {}), c)), u;
|
|
2698
2769
|
},
|
|
2699
2770
|
[t]
|
|
2700
2771
|
);
|
|
2701
|
-
},
|
|
2772
|
+
}, Rt = /\r\n|\r|\n/, le = (e) => {
|
|
2702
2773
|
e.length === 0 ? e.push({
|
|
2703
2774
|
types: ["plain"],
|
|
2704
2775
|
content: `
|
|
@@ -2706,78 +2777,78 @@ var Ne = {
|
|
|
2706
2777
|
empty: !0
|
|
2707
2778
|
}) : e.length === 1 && e[0].content === "" && (e[0].content = `
|
|
2708
2779
|
`, e[0].empty = !0);
|
|
2709
|
-
},
|
|
2780
|
+
}, ie = (e, t) => {
|
|
2710
2781
|
const a = e.length;
|
|
2711
2782
|
return a > 0 && e[a - 1] === t ? e : e.concat(t);
|
|
2712
|
-
},
|
|
2713
|
-
const t = [[]], a = [e],
|
|
2714
|
-
let
|
|
2715
|
-
const
|
|
2716
|
-
for (;
|
|
2717
|
-
for (; (
|
|
2718
|
-
let g, b = t[
|
|
2719
|
-
const v = a[
|
|
2720
|
-
if (typeof v == "string" ? (b =
|
|
2721
|
-
|
|
2783
|
+
}, It = (e) => {
|
|
2784
|
+
const t = [[]], a = [e], i = [0], d = [e.length];
|
|
2785
|
+
let m = 0, c = 0, h = [];
|
|
2786
|
+
const u = [h];
|
|
2787
|
+
for (; c > -1; ) {
|
|
2788
|
+
for (; (m = i[c]++) < d[c]; ) {
|
|
2789
|
+
let g, b = t[c];
|
|
2790
|
+
const v = a[c][m];
|
|
2791
|
+
if (typeof v == "string" ? (b = c > 0 ? b : ["plain"], g = v) : (b = ie(b, v.type), v.alias && (b = ie(b, v.alias)), g = v.content), typeof g != "string") {
|
|
2792
|
+
c++, t.push(b), a.push(g), i.push(0), d.push(g.length);
|
|
2722
2793
|
continue;
|
|
2723
2794
|
}
|
|
2724
|
-
const w = g.split(
|
|
2725
|
-
|
|
2795
|
+
const w = g.split(Rt), n = w.length;
|
|
2796
|
+
h.push({
|
|
2726
2797
|
types: b,
|
|
2727
2798
|
content: w[0]
|
|
2728
2799
|
});
|
|
2729
2800
|
for (let r = 1; r < n; r++)
|
|
2730
|
-
|
|
2801
|
+
le(h), u.push(h = []), h.push({
|
|
2731
2802
|
types: b,
|
|
2732
2803
|
content: w[r]
|
|
2733
2804
|
});
|
|
2734
2805
|
}
|
|
2735
|
-
|
|
2806
|
+
c--, t.pop(), a.pop(), i.pop(), d.pop();
|
|
2736
2807
|
}
|
|
2737
|
-
return
|
|
2738
|
-
},
|
|
2808
|
+
return le(h), u;
|
|
2809
|
+
}, ue = It, Lt = ({ prism: e, code: t, grammar: a, language: i }) => ve(() => {
|
|
2739
2810
|
if (a == null)
|
|
2740
|
-
return
|
|
2811
|
+
return ue([t]);
|
|
2741
2812
|
const d = {
|
|
2742
2813
|
code: t,
|
|
2743
2814
|
grammar: a,
|
|
2744
|
-
language:
|
|
2815
|
+
language: i,
|
|
2745
2816
|
tokens: []
|
|
2746
2817
|
};
|
|
2747
|
-
return e.hooks.run("before-tokenize", d), d.tokens = e.tokenize(t, a), e.hooks.run("after-tokenize", d),
|
|
2818
|
+
return e.hooks.run("before-tokenize", d), d.tokens = e.tokenize(t, a), e.hooks.run("after-tokenize", d), ue(d.tokens);
|
|
2748
2819
|
}, [
|
|
2749
2820
|
t,
|
|
2750
2821
|
a,
|
|
2751
|
-
|
|
2822
|
+
i,
|
|
2752
2823
|
// prism is a stable import
|
|
2753
2824
|
e
|
|
2754
|
-
]),
|
|
2755
|
-
const { plain: a } = e,
|
|
2756
|
-
const { languages:
|
|
2757
|
-
return
|
|
2758
|
-
const g = B(B({}, d[
|
|
2759
|
-
d[
|
|
2825
|
+
]), Ot = (e, t) => {
|
|
2826
|
+
const { plain: a } = e, i = e.styles.reduce((d, m) => {
|
|
2827
|
+
const { languages: c, style: h } = m;
|
|
2828
|
+
return c && !c.includes(t) || m.types.forEach((u) => {
|
|
2829
|
+
const g = B(B({}, d[u]), h);
|
|
2830
|
+
d[u] = g;
|
|
2760
2831
|
}), d;
|
|
2761
2832
|
}, {});
|
|
2762
|
-
return
|
|
2763
|
-
},
|
|
2833
|
+
return i.root = a, i.plain = q(B({}, a), { backgroundColor: void 0 }), i;
|
|
2834
|
+
}, Nt = Ot, Ct = ({
|
|
2764
2835
|
children: e,
|
|
2765
2836
|
language: t,
|
|
2766
2837
|
code: a,
|
|
2767
|
-
theme:
|
|
2838
|
+
theme: i,
|
|
2768
2839
|
prism: d
|
|
2769
2840
|
}) => {
|
|
2770
|
-
const
|
|
2841
|
+
const m = t.toLowerCase(), c = Nt(i, m), h = Ft(c), u = Tt(c), g = d.languages[m], b = Lt({ prism: d, language: m, code: a, grammar: g });
|
|
2771
2842
|
return e({
|
|
2772
2843
|
tokens: b,
|
|
2773
|
-
className: `prism-code language-${
|
|
2774
|
-
style:
|
|
2775
|
-
getLineProps:
|
|
2776
|
-
getTokenProps:
|
|
2844
|
+
className: `prism-code language-${m}`,
|
|
2845
|
+
style: c != null ? c.root : {},
|
|
2846
|
+
getLineProps: h,
|
|
2847
|
+
getTokenProps: u
|
|
2777
2848
|
});
|
|
2778
|
-
},
|
|
2849
|
+
}, Dt = (e) => he(Ct, q(B({}, e), {
|
|
2779
2850
|
prism: e.prism || o,
|
|
2780
|
-
theme: e.theme ||
|
|
2851
|
+
theme: e.theme || fe,
|
|
2781
2852
|
code: e.code,
|
|
2782
2853
|
language: e.language
|
|
2783
2854
|
}));
|
|
@@ -2793,86 +2864,6 @@ prismjs/prism.js:
|
|
|
2793
2864
|
* @public
|
|
2794
2865
|
*)
|
|
2795
2866
|
*/
|
|
2796
|
-
var Tt = (e, t, a, l, d, h, u, m) => {
|
|
2797
|
-
let c = document.documentElement, g = ["light", "dark"];
|
|
2798
|
-
function b(w) {
|
|
2799
|
-
(Array.isArray(e) ? e : [e]).forEach((n) => {
|
|
2800
|
-
let r = n === "class", s = r && h ? d.map((p) => h[p] || p) : d;
|
|
2801
|
-
r ? (c.classList.remove(...s), c.classList.add(w)) : c.setAttribute(n, w);
|
|
2802
|
-
}), y(w);
|
|
2803
|
-
}
|
|
2804
|
-
function y(w) {
|
|
2805
|
-
m && g.includes(w) && (c.style.colorScheme = w);
|
|
2806
|
-
}
|
|
2807
|
-
function v() {
|
|
2808
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2809
|
-
}
|
|
2810
|
-
if (l) b(l);
|
|
2811
|
-
else try {
|
|
2812
|
-
let w = localStorage.getItem(t) || a, n = u && w === "system" ? v() : w;
|
|
2813
|
-
b(n);
|
|
2814
|
-
} catch {
|
|
2815
|
-
}
|
|
2816
|
-
}, le = ["light", "dark"], fe = "(prefers-color-scheme: dark)", Rt = typeof window > "u", J = _.createContext(void 0), It = { setTheme: (e) => {
|
|
2817
|
-
}, themes: [] }, Lt = () => {
|
|
2818
|
-
var e;
|
|
2819
|
-
return (e = _.useContext(J)) != null ? e : It;
|
|
2820
|
-
}, Gt = (e) => _.useContext(J) ? _.createElement(_.Fragment, null, e.children) : _.createElement(Ct, { ...e }), Ot = ["light", "dark"], Ct = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: a = !0, enableColorScheme: l = !0, storageKey: d = "theme", themes: h = Ot, defaultTheme: u = a ? "system" : "light", attribute: m = "data-theme", value: c, children: g, nonce: b, scriptProps: y }) => {
|
|
2821
|
-
let [v, w] = _.useState(() => ie(d, u)), [n, r] = _.useState(() => ie(d)), s = c ? Object.values(c) : h, p = _.useCallback((k) => {
|
|
2822
|
-
let x = k;
|
|
2823
|
-
if (!x) return;
|
|
2824
|
-
k === "system" && a && (x = ue());
|
|
2825
|
-
let S = c ? c[x] : x, F = t ? Dt(b) : null, A = document.documentElement, C = (T) => {
|
|
2826
|
-
T === "class" ? (A.classList.remove(...s), S && A.classList.add(S)) : T.startsWith("data-") && (S ? A.setAttribute(T, S) : A.removeAttribute(T));
|
|
2827
|
-
};
|
|
2828
|
-
if (Array.isArray(m) ? m.forEach(C) : C(m), l) {
|
|
2829
|
-
let T = le.includes(u) ? u : null, O = le.includes(x) ? x : T;
|
|
2830
|
-
A.style.colorScheme = O;
|
|
2831
|
-
}
|
|
2832
|
-
F == null || F();
|
|
2833
|
-
}, [b]), i = _.useCallback((k) => {
|
|
2834
|
-
let x = typeof k == "function" ? k(v) : k;
|
|
2835
|
-
w(x);
|
|
2836
|
-
try {
|
|
2837
|
-
localStorage.setItem(d, x);
|
|
2838
|
-
} catch {
|
|
2839
|
-
}
|
|
2840
|
-
}, [v]), f = _.useCallback((k) => {
|
|
2841
|
-
let x = ue(k);
|
|
2842
|
-
r(x), v === "system" && a && !e && p("system");
|
|
2843
|
-
}, [v, e]);
|
|
2844
|
-
_.useEffect(() => {
|
|
2845
|
-
let k = window.matchMedia(fe);
|
|
2846
|
-
return k.addListener(f), f(k), () => k.removeListener(f);
|
|
2847
|
-
}, [f]), _.useEffect(() => {
|
|
2848
|
-
let k = (x) => {
|
|
2849
|
-
x.key === d && (x.newValue ? w(x.newValue) : i(u));
|
|
2850
|
-
};
|
|
2851
|
-
return window.addEventListener("storage", k), () => window.removeEventListener("storage", k);
|
|
2852
|
-
}, [i]), _.useEffect(() => {
|
|
2853
|
-
p(e ?? v);
|
|
2854
|
-
}, [e, v]);
|
|
2855
|
-
let E = _.useMemo(() => ({ theme: v, setTheme: i, forcedTheme: e, resolvedTheme: v === "system" ? n : v, themes: a ? [...h, "system"] : h, systemTheme: a ? n : void 0 }), [v, i, e, n, a, h]);
|
|
2856
|
-
return _.createElement(J.Provider, { value: E }, _.createElement(Nt, { forcedTheme: e, storageKey: d, attribute: m, enableSystem: a, enableColorScheme: l, defaultTheme: u, value: c, themes: h, nonce: b, scriptProps: y }), g);
|
|
2857
|
-
}, Nt = _.memo(({ forcedTheme: e, storageKey: t, attribute: a, enableSystem: l, enableColorScheme: d, defaultTheme: h, value: u, themes: m, nonce: c, scriptProps: g }) => {
|
|
2858
|
-
let b = JSON.stringify([a, t, h, e, m, u, l, d]).slice(1, -1);
|
|
2859
|
-
return _.createElement("script", { ...g, suppressHydrationWarning: !0, nonce: typeof window > "u" ? c : "", dangerouslySetInnerHTML: { __html: `(${Tt.toString()})(${b})` } });
|
|
2860
|
-
}), ie = (e, t) => {
|
|
2861
|
-
if (Rt) return;
|
|
2862
|
-
let a;
|
|
2863
|
-
try {
|
|
2864
|
-
a = localStorage.getItem(e) || void 0;
|
|
2865
|
-
} catch {
|
|
2866
|
-
}
|
|
2867
|
-
return a || t;
|
|
2868
|
-
}, Dt = (e) => {
|
|
2869
|
-
let t = document.createElement("style");
|
|
2870
|
-
return e && t.setAttribute("nonce", e), t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")), document.head.appendChild(t), () => {
|
|
2871
|
-
window.getComputedStyle(document.body), setTimeout(() => {
|
|
2872
|
-
document.head.removeChild(t);
|
|
2873
|
-
}, 1);
|
|
2874
|
-
};
|
|
2875
|
-
}, ue = (e) => (e || (e = window.matchMedia(fe)), e.matches ? "dark" : "light");
|
|
2876
2867
|
globalThis.Prism = o;
|
|
2877
2868
|
import("./prism-bash.min-HHIMdNJ_.js");
|
|
2878
2869
|
import("./prism-ruby.min-Dx9KO9ds.js").then((e) => e.p);
|
|
@@ -2886,89 +2877,99 @@ import("./prism-javascript.min-CEqHqgbm.js");
|
|
|
2886
2877
|
import("./prism-typescript.min-CD7H2IYQ.js").then((e) => e.p);
|
|
2887
2878
|
const Bt = {
|
|
2888
2879
|
mdx: "md"
|
|
2889
|
-
},
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2880
|
+
}, Gt = ({
|
|
2881
|
+
language: e = "plain",
|
|
2882
|
+
showCopy: t = "hover",
|
|
2883
|
+
showCopyText: a,
|
|
2884
|
+
title: i,
|
|
2885
|
+
children: d,
|
|
2886
|
+
...m
|
|
2894
2887
|
}) => {
|
|
2895
|
-
const { resolvedTheme:
|
|
2896
|
-
if (!
|
|
2888
|
+
const { resolvedTheme: c } = Fe(), [h, u] = ke(!1), g = d ?? m.code;
|
|
2889
|
+
if (!g)
|
|
2897
2890
|
return null;
|
|
2898
|
-
const
|
|
2891
|
+
const b = c === "dark" ? Q.vsDark : Q.github;
|
|
2899
2892
|
return /* @__PURE__ */ I.jsx(
|
|
2900
2893
|
xe,
|
|
2901
2894
|
{
|
|
2902
2895
|
fallback: /* @__PURE__ */ I.jsxs("div", { className: "relative group", children: [
|
|
2903
|
-
|
|
2896
|
+
i && /* @__PURE__ */ I.jsx("div", { className: "text-xs text-muted-foreground absolute top-2 font-mono border-b w-full pb-2 px-4 ", children: i }),
|
|
2904
2897
|
/* @__PURE__ */ I.jsx(
|
|
2905
2898
|
"pre",
|
|
2906
2899
|
{
|
|
2907
|
-
className:
|
|
2900
|
+
className: V(
|
|
2908
2901
|
"relative scrollbar overflow-x-auto",
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2902
|
+
m.className,
|
|
2903
|
+
m.noBackground ? "!bg-transparent" : "bg-[#f6f8fa] text-[#393a34] dark:bg-[#1e1e1e] dark:text-[#9cdcfe]",
|
|
2904
|
+
m.wrapLines && "whitespace-pre-wrap break-words",
|
|
2905
|
+
i && "pt-10"
|
|
2913
2906
|
),
|
|
2914
|
-
children:
|
|
2907
|
+
children: g
|
|
2915
2908
|
}
|
|
2916
2909
|
),
|
|
2917
|
-
|
|
2910
|
+
m.showLanguageIndicator && /* @__PURE__ */ I.jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children: e })
|
|
2918
2911
|
] }),
|
|
2919
2912
|
children: /* @__PURE__ */ I.jsx(
|
|
2920
|
-
|
|
2913
|
+
Dt,
|
|
2921
2914
|
{
|
|
2922
|
-
theme:
|
|
2923
|
-
language: Bt[
|
|
2924
|
-
...
|
|
2925
|
-
|
|
2926
|
-
|
|
2915
|
+
theme: b,
|
|
2916
|
+
language: Bt[e] ?? e,
|
|
2917
|
+
...m,
|
|
2918
|
+
code: g,
|
|
2919
|
+
children: ({ className: v, style: w, tokens: n, getLineProps: r, getTokenProps: s }) => /* @__PURE__ */ I.jsxs("div", { className: "relative group", children: [
|
|
2920
|
+
i && /* @__PURE__ */ I.jsx("div", { className: "text-xs text-muted-foreground absolute top-2 font-mono border-b w-full pb-2 px-4 ", children: i }),
|
|
2927
2921
|
/* @__PURE__ */ I.jsx(
|
|
2928
2922
|
"pre",
|
|
2929
2923
|
{
|
|
2930
|
-
className:
|
|
2924
|
+
className: V(
|
|
2931
2925
|
"relative scrollbar overflow-x-auto",
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2926
|
+
v,
|
|
2927
|
+
m.className,
|
|
2928
|
+
m.noBackground && "!bg-transparent",
|
|
2929
|
+
m.wrapLines && "whitespace-pre-wrap break-words",
|
|
2930
|
+
i && "pt-10"
|
|
2937
2931
|
),
|
|
2938
|
-
style:
|
|
2939
|
-
children:
|
|
2932
|
+
style: w,
|
|
2933
|
+
children: n.map((p, l) => (
|
|
2940
2934
|
// eslint-disable-next-line react/no-array-index-key
|
|
2941
|
-
/* @__PURE__ */ I.jsx("div", { ...
|
|
2935
|
+
/* @__PURE__ */ I.jsx("div", { ...r({ line: p }), children: p.map((y, E) => (
|
|
2942
2936
|
// eslint-disable-next-line react/no-array-index-key
|
|
2943
|
-
/* @__PURE__ */ I.jsx("span", { ...
|
|
2944
|
-
)) },
|
|
2937
|
+
/* @__PURE__ */ I.jsx("span", { ...s({ token: y }) }, E)
|
|
2938
|
+
)) }, l)
|
|
2945
2939
|
))
|
|
2946
2940
|
}
|
|
2947
2941
|
),
|
|
2948
|
-
|
|
2949
|
-
|
|
2942
|
+
m.showLanguageIndicator && /* @__PURE__ */ I.jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children: e }),
|
|
2943
|
+
t !== "never" && /* @__PURE__ */ I.jsxs(
|
|
2950
2944
|
"button",
|
|
2951
2945
|
{
|
|
2952
2946
|
type: "button",
|
|
2953
2947
|
"aria-label": "Copy code",
|
|
2954
2948
|
title: "Copy code",
|
|
2955
|
-
className:
|
|
2949
|
+
className: V(
|
|
2950
|
+
"absolute top-2 right-2 p-2 hover:outline hover:outline-border/75 dark:hover:outline-border rounded-md text-sm text-muted-foreground transition",
|
|
2951
|
+
t === "hover" ? "opacity-0 group-hover:opacity-100 group-hover:bg-zinc-100 group-hover:dark:bg-zinc-700" : "bg-zinc-100 dark:bg-zinc-700",
|
|
2952
|
+
a && "flex gap-2 items-center font-medium"
|
|
2953
|
+
),
|
|
2956
2954
|
disabled: h,
|
|
2957
2955
|
onClick: () => {
|
|
2958
2956
|
u(!0), navigator.clipboard.writeText(
|
|
2959
|
-
|
|
2957
|
+
n.map((p) => p.map(({ content: l }) => l).join("")).join(`
|
|
2960
2958
|
`)
|
|
2961
2959
|
), setTimeout(() => u(!1), 2e3);
|
|
2962
2960
|
},
|
|
2963
|
-
children:
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2961
|
+
children: [
|
|
2962
|
+
h ? /* @__PURE__ */ I.jsx(
|
|
2963
|
+
we,
|
|
2964
|
+
{
|
|
2965
|
+
className: "text-emerald-600",
|
|
2966
|
+
size: 16,
|
|
2967
|
+
strokeWidth: 2.5,
|
|
2968
|
+
absoluteStrokeWidth: !0
|
|
2969
|
+
}
|
|
2970
|
+
) : /* @__PURE__ */ I.jsx(Ee, { size: 16 }),
|
|
2971
|
+
a && "Copy"
|
|
2972
|
+
]
|
|
2972
2973
|
}
|
|
2973
2974
|
)
|
|
2974
2975
|
] })
|
|
@@ -2978,9 +2979,8 @@ const Bt = {
|
|
|
2978
2979
|
);
|
|
2979
2980
|
};
|
|
2980
2981
|
export {
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
Lt as z
|
|
2982
|
+
Ut as J,
|
|
2983
|
+
Gt as S,
|
|
2984
|
+
Fe as z
|
|
2985
2985
|
};
|
|
2986
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
2986
|
+
//# sourceMappingURL=SyntaxHighlight-CcnUjERD.js.map
|